Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Previously, when the chown utility was used on NFSv4 mount, chown did not adhere the no_root_squash option, and thus was not able to change the user and group ownership of each given file. The libnfsidmap, a library to help mapping IDs mainly for NFSv4, has been patched, and chown now handles the user and group ownership as expected.
commit 3226c06989186d9cd60ba146df4e2898fee5047b
Author: Steve Dickson <steved>
Date: Wed Apr 30 11:14:22 2014 -0400
libnfsidmap: id_as_chars() fails zero value ids.
Root has a zero value id which is valid and
should not be mapped to nfsnobody
Signed-off-by: Steve Dickson <steved>
Upstream tag: libnfsidmap-0-26-rc4
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.
http://rhn.redhat.com/errata/RHBA-2014-1451.html
Created attachment 837300 [details] data_root.pcap Description of problem: when chown a file on nfsv4 mount it seems to not respect NFSv4 no_root_squash option: NFS server export: [root@nfs ~]# cat /etc/exports /scratch *(rw,fsid=0,async,insecure,no_root_squash) [root@nfs ~]# exportfs -rv exporting *:/scratch NFS Client: [root@client ~]# mount -t nfs -o vers=4 nfs.example.org:/ /mnt/rhel6/ [root@client ~]# cat /proc/mounts rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 devtmpfs /dev devtmpfs rw,relatime,size=500204k,nr_inodes=125051,mode=755 0 0 devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /dev/shm tmpfs rw,relatime 0 0 /dev/mapper/myvg-rootvol / ext4 rw,relatime,barrier=1,data=ordered 0 0 /proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0 /dev/vda1 /boot ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0 sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 nfs.example.org:/ /mnt/rhel6 nfs4 rw,relatime,vers=4,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.33.20.36,minorversion=0,local_lock=none,addr=10.33.20.128 0 0 Create a file: [root@client ~]# touch /mnt/rhel6/testfile_root [root@client ~]# ll /mnt/rhel6/testfile_root -rw-r--r-- 1 root root 0 Dec 16 2013 /mnt/rhel6/testfile_root Chown the file: [root@client ~]# chown root:root /mnt/rhel6/testfile_root [root@client ~]# ll /mnt/rhel6/testfile_root -rw-r--r-- 1 nobody nobody 0 Dec 16 2013 /mnt/rhel6/testfile_root Doing the same for a "normal" user works as expected: [root@client ~]# su - test Create a file: [test@client ~]$ touch /mnt/rhel6/testfile_test [test@client ~]$ ll /mnt/rhel6/testfile_test -rw-rw-r-- 1 test test 0 Dec 16 2013 /mnt/rhel6/testfile_test Chown the file: [test@client ~]$ chown test:test /mnt/rhel6/testfile_test [test@client ~]$ ll /mnt/rhel6/testfile_test -rw-rw-r-- 1 test test 0 Dec 16 2013 /mnt/rhel6/testfile_test Version-Release number of selected component (if applicable): -RHEL 6.5 -kernel-2.6.32-431.1.2.el6.x86_64 -nfs-utils-1.2.3-39.el6.x86_64 How reproducible: always Steps to Reproduce: 1. cat /etc/exports /scratch *(rw,fsid=0,async,insecure,no_root_squash) 2. # mount -t nfs -o vers=4 nfs.example.org:/ /mnt/rhel6/ 3. # touch /mnt/rhel6/testfile_root => check file perms: -rw-r--r-- 1 root root 0 Dec 16 2013 /mnt/rhel6/testfile_root 4. # chown root:root /mnt/rhel6/testfile_root => check file perms: -rw-r--r-- 1 nobody nobody 0 Dec 16 2013 /mnt/rhel6/testfile_root Actual results: chown to root:root results in nobody:nobody Expected results: chown to root:root results in root:root Additional info: attached * data_root.pcap mount/touch/chown as root user * data_test.pcap touch/chown as test user