Setting default umask for NFS
by nelis249 from LinuxQuestions.org on (#4YJ5Q)
Scenario:
Have a RedHat 7 server hosting NFSv4 and SMB completely for anonymous storage. Other Linux machines connect via NFS and write folders/files. Windows machines connect via SMB and write folders/files.
On the SMB configuration there are two options 'create mask = 0777' and 'directory mask = 0777'. This forces anyone copying over folders/files that the umask is 777 so that anyone can read/write/modify, etc... This is the desired configuration.
Question:
Is there a similar configuration for NFS?
What it being noticed is that when a Linux machine creates a folder, the folder permissions are restricted. Since this happens, if the folder is created in NFS, it cannot be written to from SMB connections.
The NFS config is:
/var/testShare *(rw,fsid=0,sync,all_squash)
Here is an example of a folder list with a folder created from an NFS connection and another created from an SMB connection.
[root@test ~]# ls -l /var/testShare
drwxr-xr-x. 2 nfsnobody nfsnobody 4096 Jan 28 13:29 nfs
drwxrwxrwx. 3 nobody nobody 4096 Jan 28 13:34 smb
Not sure if the 'nfsnobody' is the problem vs 'nobody'.
The thought is that all_squash flag keeps the Linux servers from specifying users/groups.
Any ideas would be appreciated.
-N


Have a RedHat 7 server hosting NFSv4 and SMB completely for anonymous storage. Other Linux machines connect via NFS and write folders/files. Windows machines connect via SMB and write folders/files.
On the SMB configuration there are two options 'create mask = 0777' and 'directory mask = 0777'. This forces anyone copying over folders/files that the umask is 777 so that anyone can read/write/modify, etc... This is the desired configuration.
Question:
Is there a similar configuration for NFS?
What it being noticed is that when a Linux machine creates a folder, the folder permissions are restricted. Since this happens, if the folder is created in NFS, it cannot be written to from SMB connections.
The NFS config is:
/var/testShare *(rw,fsid=0,sync,all_squash)
Here is an example of a folder list with a folder created from an NFS connection and another created from an SMB connection.
[root@test ~]# ls -l /var/testShare
drwxr-xr-x. 2 nfsnobody nfsnobody 4096 Jan 28 13:29 nfs
drwxrwxrwx. 3 nobody nobody 4096 Jan 28 13:34 smb
Not sure if the 'nfsnobody' is the problem vs 'nobody'.
The thought is that all_squash flag keeps the Linux servers from specifying users/groups.
Any ideas would be appreciated.
-N