Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 5205  / 1 Year ago, sun, march 26, 2023, 12:17:08

I got a raspberry pi 2 and an old hdd, so i wanted to create a samba share for this old hdd. I mounted my hdd with ntfs-3g to /media/usb which works fine.



I added this to my smb.conf file:



[smb]
path = /media/usb
available = yes
read only = no
browseable = yes
public = yes
writable = yes


I set the permission with sudo chmod 777 -R /media/usb and restarted the samba service.
Next i tried to access my smb from windows, but i couldn't. It said: "no access to xxx.xxx.x.xxx/smb" and something like ask your network administrator for permission(translated from dutch). Checking my permisions with ls -ld /media/usb I got drwxrwx---



I tried other configs but none of them seemed to work. At this point I created a second share to my smb.conf with the same config, but with /home as the path. Now this share works, but my first share still doesn't, but it has the same config.



I don't understand what's wrong and I can't find a solution. Can someone help me. Has this something to do with the hdd mount?


More From » mount

 Answers
1

Clearly the permissions are not right. I set the permissions but the changes were lost multiple times.
I auto-mounted the hdd with the following line in my fstab file:



sudo mount -t ntfs-3g -o uid=1000,gid=1000,umask=007 /dev/sda1 /media/NASDRIVE


I noticed the umask=007 which caused my problems. I changed it to 000, which I know is not save.


[#21118] Tuesday, March 28, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sweetrifiabl

Total Points: 422
Total Questions: 94
Total Answers: 120

Location: Bonaire
Member since Sat, Sep 24, 2022
2 Years ago
sweetrifiabl questions
Mon, Apr 4, 22, 16:02, 2 Years ago
Sat, Jul 17, 21, 01:40, 3 Years ago
Thu, Nov 18, 21, 17:36, 2 Years ago
Mon, Jan 17, 22, 19:02, 2 Years ago
;