Maintainign a ubuntu server for a client where they use several file shares through smb.

Fileshares have permisions to user groups and are set to 0770

Lately I get a lot of complaints from users who can't access files and it's always the same, for some reason the permissions of certain files /folders have changed ...

Already using create mask, but maybe I should put "map archive = no" in the default? Never used this in smb config so not sure what it does?

This is my share config in smb.conf

        writeable = yes
        path = /home/file-share
        write list = user1,user2,user3,@usergroup
        force directory mode = 770
        force group = usergroup
        force create mode = 770
        comment = usergroup
        valid users = user1,user2,user3,@usergroup
        user = user1,user2,user3,@usergroup
        create mode = 770
        browsable = yes
        directory mode = 770

Would adding a "map archive = no" avoid having to reset file permissions the whole time?

  • Are you sure your server hasn't been compromised? – Deer Hunter Nov 11 '14 at 12:29
  • Permisions are set to only read, not 777. Checked logs, host files, /var/www/hosts nothing there what is out of place. Also this is mainly used as file server not as a webserver. Am asuming file permisions are getting skewed by users copying local files to the server and somehow permissions get copied aswell. – bcnmm Nov 11 '14 at 15:48

all you should need for samba is this

        create mask = 660
        directory mask = 770
        inherit acls = Yes
        path = /wherever/yourfolder
        read only = No

When a given user from a windows client does create new folder it should have permissions drwxrwx--- and when doing create new text file that new file should be -rw-rw----. If that does not happen, then to troubleshoot set the masks to 666 and 777 respectively or remove those two lines and see what happens after creating a new folder and new text file.

Obviously if you use masks 660 and 770 then be sure a given user has the correct group permissions. By default all user accounts are typically in the users group, and that is their primary group, anything created by them will have the group permissions of users and it all should work seamlessly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.