NFS: Change ownership issue

We are accessing NFS mounts across three hosts in our QA environment. The issue for us is that when we change the ownership of a directory on NFS mount on the server, the ownership changes are not taking place on the client. It is getting changed to nobody on the client. The issue can be seen for a particular user , for other users it is working fine. The user in question is the following user content .

If we change the ownership to content manually on the client, it is getting changed to nobody user. But if changed to some other user, it works fine.

Please find  /etc/exports for the particular directory on the server.

/shared/share       *(rw,no_root_squash,sync)
On the client machine, it is mounted as follows

car-lnx:/shared/share  /data/share  nfs   vers=3,rw   0  0
Example on the Server:

$ sudo chown content test
$ ls -l -rw-rw-r-- 1 content admin 0 Aug 20 23:08 test 

Example on the Client: 

$ ls -l -rw-rw-r-- 1 nobody admin 0 Aug 20 23:08 test

This is the issue where the ownership is not getting changed to content .

HowTo Resolve

  1.  UID for content user should be same on NFS server and across all NFS client hosts where the share is mounted.
  2. Once we change the UIDs , we need to clear NFS cache across all client QA hosts  where the share is mounted using the below command.
               sudo nfsidmap -c



Popular posts from this blog

PSSH : Parallel SSH to execute commands on a number of hosts

How to add check_http as a service in Nagios Monitoring using NRPE

Configuring Nagios to monitor services using NRPE