New files/folders default permissions

Status
Not open for further replies.

poster72

Dabbler
Joined
Aug 1, 2012
Messages
10
This feels like it should be easier than this! I cant find an answer.

Freenas 8.2.0 release p1. Have a share set up in which all files are owned by cory:cory. chmod all files to 700. when i create new files or folders from a windows 7 box on this using the user cory, the owner and group are correct but permissions default to 755.

I will be syncing data to this freenas box over time, and would rather the new files/folders default to 700, is this possible without having to chmod every time data is created?
 

poster72

Dabbler
Joined
Aug 1, 2012
Messages
10
im a noob here, so if more info is needed let me know. been reading about umask but it didnt seem to do anything. also see a file mask and directory mask within the setup of the cifs service itself, but the problem is i have two shares. one with 700 and one with 755, so i dont want new files/folders to default to the same for both shares.
 

poster72

Dabbler
Joined
Aug 1, 2012
Messages
10
I know im being impatient here but someone has to lead me in the right direction. This freenas setup has killed me this far and ive finally broken down for help on this.

I have several shares and if i create a file/folder from windows or from the command prompt, most create new files and folders with 755 default permissions, one creates them with 777 permissions....WHAT CONTROLS THIS?
 

poster72

Dabbler
Joined
Aug 1, 2012
Messages
10
alright, using getfacl command i can see where it might be getting its default permissions, but how do i use setfacl to change these to what i want? am i on the right path?
 

poster72

Dabbler
Joined
Aug 1, 2012
Messages
10
man, someone here has to know this and point me in the right direction.

Can anyone tell me why im getting branding mismatch errors when i try to run setfacl? It yells about the existing ACL being NFSv4 and the entry to be merged is POSIX and fails. How do i fix this?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
William, is it possible to have two shares setup with one defaulting permissions on new files and folders to 700 and the other defaulting permissions to 755?
I would say yes. Though I haven't tried it. Edit the share and add it under Auxiliary Parameters.
 

bertrem

Dabbler
Joined
Feb 19, 2013
Messages
15
Can anyone tell me why im getting branding mismatch errors when i try to run setfacl? It yells about the existing ACL being NFSv4 and the entry to be merged is POSIX and fails. How do i fix this?

I had the same problem. You have to use a syntax other than the one that the man page suggests you should use. :mad:

Commands of this form will not work:
setfacl -m owner@:rwx informatique

The ACL must be more fully specified like so:
setfacl -m group@:rwxpDdaARWcCos:fd----:allow /mnt/casadata/Shared
or
setfacl -m u:bert:rwxpDdaA:------:allow test.txt

I think the minimal requirement is that all four fields must be included, separated by colons:
setfacl -m <who>:<privs1>:<privs2>:allow <file>
 
Status
Not open for further replies.
Top