Changing default filemasks does not work in CIFS

Status
Not open for further replies.

olegsomphane

Dabbler
Joined
Oct 6, 2011
Messages
18
Hmm, I cannot seem to be able to change the default file and directory masks in CIFS.

I have:
File mask 0750
Directory mask 0770

But when I create a folder or file using Windows Explorer, the masks are still 777 and 666 respectively. I even set Auxiliary parameters to the following but it is still not working:
create mask = 0750
directory security mask = 0770

My goal is basically to have a shared public folder where people can add and read files or folders, but only the owner (person who added the file) and write to it. Can anyone lend a hand?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Try 7020 for your mask to get a file with 750 and 7007 for your directory mask. I think the mask needs to be 'inverted' from what you want it to be.
 

olegsomphane

Dabbler
Joined
Oct 6, 2011
Messages
18
If I try 7020 and 7007 for the file and directory masks, the FreeNas GUI won't let me save because "This is not a valid mask"
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Ok, I just verified, do it without the 7 at the beginning, so 020 and 007.
 

olegsomphane

Dabbler
Joined
Oct 6, 2011
Messages
18
So what happened was I had to restart my samba connection on windows to have the changes take effect. Saving the settings, which appeared to restart the samba daemon was not sufficient to apply the new masks.

The settings are not inverted or subtracting from the original or default masks. I used 650 for files and 770 for folders.

Thanks for the help :)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Thanks for sharing your results. I guess the term "Mask" is inappropriate, they should label it "Default" or something else since most people familiar with Unix expect Mask to work the other way! It's good to know just restarting the daemon isn't sufficient also, thanks.
 
Status
Not open for further replies.
Top