File permission mask/mode settings for Samba on FreeNAS?
5,709
chmod g+s
for parent directory- set
inherit permissions = yes
and try again.
Related videos on Youtube
Author by
Coolar
Team Leader and Front End Developer working at the digital agency Limetta in Stockholm, Sweden. Limetta Personal webpage
Updated on September 18, 2022Comments
-
Coolar almost 2 years
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?
-
Admin almost 13 yearsWhich Samba version are you using?
-
Admin almost 13 yearsJust a note: Unless you have a very special situation you probably do not want your files to have the set-gid bit set. For the directories it makes sense but not for the normal files.
-
Admin almost 13 yearsquanta: I'm using FreeNAS version 0.7.2. In this I think version 3.5.5 of Samba is included.
-
Admin almost 13 yearssnap: Thanks! One thing I could try is change it to 770 on create mask and create mode.
-
-
Coolar almost 13 yearsSorry - no difference. I suspect that there is some configuration or quirk in FreeNAS that I've overlooked?