Wednesday, February 25, 2009

NFS with ACL ignore Umask

NFS share at client side user umask is 0022 and i want to change file and folder creation permission on share folder but without touching umask variable.


After lots of digging i found umask is not working for NFS and NFS share so i found there is support of ACL on NFS share so i have used ACL for NFS file and folder permissions here i am not going to explain in detail but i show you my example and further you can read ACL manual for advance knowledge. I have set few permission on NFS share folder so anybody on client side create file permission will be according to ACL it will ignore UMASK Variable of Linux thats sound like great. here we go

/share <-NFS share folder where i am going to put ACL rules.

setfacl --set u::rwx,g::rwx,o::rwx /share

setfacl -d --set u::rwx,g::rwx,g:mygroup:rw,o::x- /share

Second option "-d" will set permission default for all folders and files which will newly create.

after putting permission you can verify it by "getfacl" command and "ls -l" command will mark files and directories with "+" sign.

I need your comment on this please give your input.

Good Luck!!!