NAS NFS Share: Applying No_Root_Squash and Anonymous uid/gid=0 Settings |
The no_root_squash setting allows NFS (Network File System) clients to connect to the share as root. This topic provides instructions on how to apply the no_root_squash setting and change the anonymous uid/gid=0 settings to grant permission to NFS clients to change permissions of files/directories.
SR Information: 1462992, 1468994 and 1463040
Product / Software Version: All DXi platforms with 1.x and 2.x software.
Problem Description: The customer has a DXi system running (version 2.1.3) and needs to apply the no_root_squash setting so NFS (Network File System) clients can connect to their shares as root. The customer also wants to change the anonymous uid/gid=0 settings on the shar to grant permission to NFS clients to change permissions of files/directories.
Reference PTRs: Bug 31103 Bug 19264 |
This topic provide instructions on the following:
Applying the no_root_squash setting does not allow NFS clients to change file/directory permissions. If you want to also grant permission to the NFS clients to change permissions of the files/directories on the NAS share, you need to change the anonymous uid/gid=0 settings, which is described below.
To apply no_root_squash to a share:
sharetool --edit share --name <name_of_nfs_nas_share> --squash none
Example:
Suppose you want to apply this change to the NFS NAS share named "test-nfs." You can see the following line in the file: /etc/exports:
/Q/shares/test-nfs *(sync,rw,root_squash,anonuid=4294967294,anongid=4294967294,no_subtree_check,anonuid=4294967294,anongid=4294967294,fsid=18850)
The command to be executed is:
sharetool --edit share --name test-nfs --squash none
After the no_root_squash setting is applied, you will see the following in /etc/exports:
/Q/shares/test-nfs *(sync,rw,no_root_squash,anonuid=4294967294,anongid=4294967294,no_subtree_check,anonuid=4294967294,anongid=4294967294,fsid=18850)
The anonymous uid/gid=0 settings allow NFS clients to inherit the root uid and gid and allow you to change the permissions, owner, and group of the files/directories in the NAS share. These settings should only be applied if requested by the customer.
Note: In a regular Linux environment, the settings above are applied by changing the exports file manually followed by the command 'exportfs -ra'. Unfortunately it was found on DXi system with 2.1.x software that this command may work but when a customer applies any change (even minor changes such as delete/add/change description of a NAS share) to any NFS NAS shares using the DXi GUI, the settings you applied manually on /etc/export with exportfs will be lost. The settings return to the default configuration. which is root_squash and anonuid/anongid = 4294967294. With that in mind, it is recommended to use the sharetool command, as described in the procedure below.
To apply Anonymous uid/gid=0 settings to a share:
Note: This command also applies no_root_squash.
sharetool --edit share --name <name_of_nfs_nas_share> --squash none --anonuid 0 --anongid 0
Example:
Suppose you want to apply the change to a NFS NAS share named "test-nfs." You can see the following line in the file: /etc/exports:
/Q/shares/test-nfs *(sync,rw,root_squash,anonuid=4294967294,anongid=4294967294,no_subtree_check,anonuid=4294967294,anongid=4294967294,fsid=18850)
The command to be executed is:
sharetool --edit share --name test-nfs --squash none --anonuid 0 --anongid 0
After the setting is applied, you will see the following in /etc/exports:
/Q/shares/test-nfs *(sync,rw,no_root_squash,anonuid=0,anongid=0,no_subtree_check,anonuid=4294967294,anongid=4294967294,fsid=18850)
This page was generated by the BrainKeeper Enterprise Wiki, © 2018 |