Bug 862183

Summary: Changing of file owner at NFS share doesn't work
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Hnidek <jiri.hnidek>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-09 13:53:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Hnidek 2012-10-02 08:11:04 UTC
Description of problem:

It is not possible to change owner of file or directory at NFS share exported with no_root_squash option.

We have NFS server running at RHEL 5.8 and NFS client at RHEL 6.3. User authentication uses same LDAP at clients and server. It was possible to change owner of file 4 months ago with the same configuration at clients and server. This is definitely regression!

Version-Release number of selected component (if applicable):

nfs-utils at client: 1.2.3
nfs-utils at server: 1.0.9

How reproducible:

 * Non-trivial setup

Steps to Reproduce:
1. Install RHEL 5 as server
2. Install NFS server and export some directory with no_root_squash option
3. Enable LDAP user authentication at server
4. Install RHEL 6 at client
5. Enable LDAP user authentication at client
6. Mount NFS share with no
  
Actual results:

 [root@client] # ls -l file
 -rw-r--r-- 1 root root 0 Oct  2 09:38 file

 [root@client] # chown user.name file

 [root@client] # ls -l file
 -rw-r--r-- 1 nobody root 0 Oct  2 09:38 file

Expected results:

 [root@client] # ls -l file
 -rw-r--r-- 1 root root 0 Oct  2 09:38 file

 [root@client] # chown user.name file

 [root@client] # ls -l file
 -rw-r--r-- 1 user.name root 0 Oct  2 09:38 file

Note: user.name is "LDAP user"

Additional info:

Sanitized configuration /etc/idmapd.conf files:

#at server: server.abc.domain.com:
[General]
Verbosity = 1
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = abc.domain.com
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch

#client client.abc.domain.com:
[General]
Verbosity = 1
Domain = abc.domain.com
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch

Sanitized configuration file /etc/exports (from server):
/data/home      client.abc.domain.com(rw,async,no_root_squash,no_all_squash,fsid=0)

Sanitized configuration file /etc/fstab (from client):
server.abc.domain.com:/   /home     nfs     rw,soft,intr,noatime,rsize=32768,wsize=32768 0 0

When root (at client) tries to change owner at NFS shared folder, then following error apears in /var/log/messages (at server):

Oct  2 10:01:43 server rpc.idmapd[22851]: nfsdcb: authbuf=client.abc.domain.com authtype=user
Oct  2 10:01:43 server rpc.idmapd[22851]: nss_getpwnam: name '1234' does not map into domain 'abc.domain.com'
Oct  2 10:01:43 server rpc.idmapd[22851]:  Server: (user) name "1234" -> id "99"

Running following command returns same result at client and server:

 # getent passwd user.name

 user.name:*:1234:2000:User Name:/home/user.name:/bin/bash

This bug is may be related somehow to this bug somehow:

 https://bugzilla.redhat.com/show_bug.cgi?id=854619

Comment 2 Steve Dickson 2012-10-09 13:53:49 UTC

*** This bug has been marked as a duplicate of bug 849945 ***