Description of problem: The uid and gid of a file created when rootsquash is enabled on a ganesha volume, is not nfsnobody Version-Release number of selected component (if applicable): glusterfs-3.7.1-7.el6rhs.x86_64 nfs-ganesha-2.2.0-3.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1. Create a ganesha volune and export it 2. Create a directory say dir and change the permissions to 777 3. Now enable root-suash for the volume, by cahnging the export directory entry and do a refresh config 4. Now if we create any directory/file within the dir, it has a uid and gid of no.- 4294967294 and not nfsnobody [root@vm8 ~]# cd /mnt/nfs1436207669.65 [root@vm8 nfs1436207669.65]# [root@vm8 nfs1436207669.65]# [root@vm8 nfs1436207669.65]# [root@vm8 nfs1436207669.65]# ls dir file.dd [root@vm8 nfs1436207669.65]# [root@vm8 nfs1436207669.65]# [root@vm8 nfs1436207669.65]# ls -ld dir drwxrwxrwx. 3 root root 102 Jul 7 00:05 dir [root@vm8 nfs1436207669.65]# cd dir [root@vm8 dir]# mkdir dir2 [root@vm8 dir]# ls -l total 0 drwxr-xr-x. 2 4294967294 4294967294 69 Jul 7 00:37 dir1 drwxr-xr-x. 2 4294967294 4294967294 36 Jul 7 00:42 dir2 [root@vm8 dir]# touch f.1 [root@vm8 dir]# ls -l total 0 drwxr-xr-x. 2 4294967294 4294967294 69 Jul 7 00:37 dir1 drwxr-xr-x. 2 4294967294 4294967294 36 Jul 7 00:42 dir2 -rw-r--r--. 1 4294967294 4294967294 0 Jul 7 00:42 f.1 [root@vm8 dir1]# id nfsnobody uid=65534(nfsnobody) gid=65534(nfsnobody) groups=65534(nfsnobody) [root@vm8 dir1]# id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) Actual results:The uid and gid of a file created when rootsquash is enabled on a ganesha volume, is not nfsnobody Expected results: The uid and gid of a file created when rootsquash is enabled on a ganesha volume, has to be nfsnobody Additional info:
From the bug1054124 >>>> The permissions that are seen when root squash is enabled is based on anonymous UID and GID values used by NFS-ganesha. The default values for both anonymous UID and anonymous GID is -2. When this is converted to a 32 bit unsigned integer, we get the large number, i.e., 4294967294 that is seen in the permissions. The expected value of 65534 is the 16 bit equivalent of -2. <<<< This is expected behaviour while using nfs-ganesha. If needed, anonymous values can be manually configured to be 16-bit equivalent value of (-2).
We should just set the uid+gid for the nfsnobody by default in our ganesha.conf. A simple and effective fix.
Doc text is edited. Please sign off to be included in Known Issues.
Doc text looks good to me.
Created attachment 1217958 [details] sample_fix
Verified the fix in build, nfs-ganesha-gluster-2.4.1-3.el7rhgs.x86_64 nfs-ganesha-2.4.1-3.el7rhgs.x86_64 glusterfs-ganesha-3.8.4-9.el7rhgs.x86_64 The uid and gid of a file created when rootsquash is enabled on a ganesha volume, is 65534.
Edited the doc text further for the errata.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2017-0493.html