Samba Inherited Permissions

In order to have anything put into a shared directory inherit the permissions of the shared directory, you need to run “chmod -R 2775 /path/to/share” with the “/path/to/share” being the folder that is shared in Samba. The 2 in the 2775 designates the “inherit” option.

One reason that you may need to do this would be if you have an access database on a Samba share that multiple people use. If a file lock is created for the first person and then more people try to connect, the file system may have that lock file inaccessible to the others. By allowing all files created in the share to inherit the share’s permissions, as long as the share allows writes, it should be fine.

A sample smb.conf file follows:

[quickbooks]
path = /home/fileshare
writeable = yes
inherit permissions = yes
directory mode = 0775
valid users = “user1, user2, user3, user4, user5”

Leave a Reply

Your email address will not be published. Required fields are marked *