Samba share only writable when chown for specific user set

6,020

make sure you added both users using

 smbpasswd -a <username>

and also check permission of shared directory

 chmod 770 /mnt/data/share/Pictures

if you want to use any group then all users that you want to allow access shared directory should be member of that group. create group using

groupadd smbuser 

assign group to share directory

 chown :smbuser /mnt/data/share/Pictures

add user to group

usermod -G smbuser christian
usermod -G smbuser test

for more info this link

Share:
6,020

Related videos on Youtube

Chris
Author by

Chris

Updated on September 18, 2022

Comments

  • Chris
    Chris over 1 year

    I have a samba server running on a Ubuntu 14.04 server

    I set up a samba share.

    [Pictures]
    writeable = yes
    path = /mnt/data/share/Pictures
    user = christian test
    valid users = christian test
    write list = christian test
    

    The problem is that when I set the chown to this:

    drwxr-xr-x 3 nobody nogroup 4096 Jul 10 18:59 Pictures
    

    I can access and read files but I am not able to edit/create/delete files/folders.

    If I alter the chown to:

    drwxr-xr-x 3 christian users   4096 Aug 15 22:03 Pictures
    

    I can edit/create/delete. But only as user christian. User test is still not able to do anything.

    Who should be the owner of the share folder to make sure that the permissions are set using the samba specific user?

  • Chris
    Chris almost 9 years
    Adding the users to the group seems to do the trick. I am now able to write/edit files and folders. But I can't delete them.
  • Chris
    Chris almost 9 years
    My bet. The file I tried to delete was created by me as root user directly via ssh. Therefore the permissions where off. Everything works now as it should. Thank you!