Reputation: 2100
On a Samba share we use for websites we force users to access as userX:www-data We've intentionally limited permissions of the group to read and execute so only those dirs that really have a reason to be writeable by the group receive these permission. We do that via a bash that sets:
chown -R userX:www-data 2771 /directory_with_write_perms
the initial 2 we understand has the same effect as a
chmod g+s
that we've also tried for this issue with the same result.
Now that dir is writeable and any new dirs or files created get the group correctly but the group still have no write permission (r-x)
I have read solutions using templates via ACLs support on the partition but we are trying to avoid that route.
Is it anyway to set permissions not only to inherit parent's group ID but also parent's write permissions?
Upvotes: 0
Views: 2689
Reputation: 111
You realised the +s bit only get's you the group correct.
You can fix the umask with samba itself and the create mask
parameter for your share.
Even better to really inherit, have a look at inherit permissions
.
actually I would recommend to not use +s but do everything in the share config to have it in one place. See inherit owner
for that.
http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
Upvotes: 1