how to set default POSIX permissions on user homes?

Status
Not open for further replies.

Luke Jaeger

Dabbler
Joined
Mar 16, 2016
Messages
43
I have FreeNAS 9.3 serving Samba shares, with AD authentication.

when users log in for the first time, their home directory is created with "domain users" as the group, and POSIX permissions = 755. This a server where students upload completed assignments, so we definitely don't want o+rx enabled!

"domain users" is an AD group which contains all students.

I would rather have a different group show up as the default and set permissions to 770. Or, if not possible to change the default group, keep "domain users" but set default permissions on homes to 700.

There's a script that runs several times a day to fine-tune the permissions, but the way it is right now, between the time someUser first logs in and the next time the permissions script runs, other users can see into someUser's home directory.

I tried changing the umask in /usr/share/skel/dot.cshrc but that didn't make a difference.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Assuming you are not using ACLs, then you probably should look at the "directory mask" share-level auxiliary parameter.
See the smb.conf manpage for more info.

With ACLs you just set the appropriate permissions / inheritance bits. There shouldn't be a need to run a script to fine-tune permissions.
 

Luke Jaeger

Dabbler
Joined
Mar 16, 2016
Messages
43
After I added a "directory mask" parameter to my smb4.conf, FreeNAS rejected all user logins either thru SMB or SSH, regardless of what permissions I set. I not only reverted the smb4.conf back to how it was before, I also had to disable and re-enable AD binding before logins started working again. Is that expected?

I figured I'd have to restart the samba service for changes to take effect, but do I also need to unbind from AD before editing the samba conf?
 
Status
Not open for further replies.
Top