This question already has an answer here:
I would really appreciate any help you guys can give me with the problem im having. First of all, im pretty comfortable with command line but by no means an linux expert so I would appreciate some detail in any answers you give if possible. Thanks!!
I am trying to set up a file server running Ubuntu 14.04. I have a folder /files and within that I will be creating a few folders that will all be shared with different permissions. I have samba running and can access the shares from machines on my network. I have changed the the owner of the files directory to be my admin user and a new group I have created, for simplicity ill call it mygroup.
I have chown'd the /files directory to myuser:mygroup and then created new users in Ubuntu and added them to mygroup as there primary group. I have also chmod'd the files directory to 770 so that both my admin user and mygroup have full write access. I then have samba users for each group and allowed them access to my shares in samba (im using a GUI by the way but happy to get stuck in with command line if I have to).
All of this so far is good, my users can connect to the samba shares from both mac and windows and they can even create directories.
The problem is, if a user creates a new directory within the share, it is created with 755 permissions meaning that other users in mygroup can read and execute but cannot write to that directory.
I have read up about ACL and have run the following command against the /files directory:
setfacl -m "g:mygroup:rwx" /files/
Then if I run:
I can see group:mygroup:rwx in the list, and the same is true if I test the subfolders of /files. As far as I am aware, this should set the permissions for any new files being created within that directory to at least be x7x?
I have also seen within smb.conf the create mask and directory mask settings, I have tried changing these to be 0775 (and uncommented them) but it is still created with the same permissions.
Can anyone recommend anything else to try?