0

I am running Samba v4.2.10-Debian on my Raspberry Pi 2B (running Raspbian Jessie) and have set up a fstab file to mount my external drive on /dev/sda1 to /media/ECHO:

/dev/sda1 /media/ECHO auto noatime 0 0.

My Samba configurations are default except SECURITY = USER and my share definition.

[ECHO] comment = ECHO NAS path = /media/ECHO/ valid users = @users force group = users create mask = 0660 directory mask = 0771 read only = no writeable = yes

I can read/write /media/ECHO from my account through SSH, however, when I connect through Samba, I am not allowed to modify anything. However this works if I set uid=justin in the fstab (which is not ideal because it wouldn't work for other users).

/media/ECHO is exFAT (exfat-fuse is installed) and mounted as drwxr-xr-x owned by root (group and user).

Any help would be appreciated, thanks!

4
  • Is your 'user' inside 'users' group?
    – edumgui
    Apr 26, 2016 at 14:25
  • All of my users are indeed inside the users group.
    – Justin
    Apr 26, 2016 at 14:46
  • Try replacing auto by defaults in fstab. If this works, but you regard it as insecure then you can turn off some of the equivalent options rw,suid,dev,exec,auto,nouser,async. Or you can try gid=users if this group has the write permissions you require.
    – AFH
    Apr 26, 2016 at 14:48
  • I managed to get it working by setting gid=users and umask=002, but thanks to everyone for helping me!
    – Justin
    Apr 26, 2016 at 14:58

1 Answer 1

0

in your mount command, provide the Group with Write permission, and change the owner-group to Users, or alternately, allow the Other group write permissions.

Normally you would use the commands below: sudo chown -R root:users /media/ECHO; sudo chmod -R 775 /media/ECHO

or

sudo chmod o+w /media/ECHO

but since you are using ex-fat, you will have to edit it in FSTAB instead.

samba permissions stack atop filesystem permissions, so even if you tell samba to allow write, it won't unless the filesystem also provides that user the same write permissions. Based on your permissions (755), only the owner (root) could write.

Adding an umask to the fstab does this if you're using exfat-fuse.

1
  • Thank you! I've managed to get it working now. Although I had tried multiple ways to set it to RW, I never tried umask. It suddenly came to me that I should've probably googled exfat-fuse with fstab read/write to search for answers, and that's what I got. I've added what did it for me to your answer for people coming here looking for solutions.
    – Justin
    Apr 26, 2016 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .