File permission mask/mode settings for Samba on FreeNAS?
- by tkahn
I'm currently working on the Samba settings on a FreeNAS server. When any user creates a file or a folder on the server I want the file or folder to get the following RWX permissions:
Folders: drwxrws---
Files: -rwxrws---
To set the permissions like this manually I use chmod 2770 which works great. But I want this to happen automatically and therefore I've added the following lines to smb.conf:
create mask = 2770
directory mask = 2770
force create mode = 2770
force directory mode = 2770
But when I test by creating a file in one of the folders it get's these permissions:
Folder: drwxrwx
File: -rwxrw----
What am I overlooking or doing wrong? Is the order of the lines relevant? Does the setgid digit (the 2 in 2770) mess things up?