[CentOS] CentOS 6: files now owned by nobody:nobody

Mon Aug 29 23:23:55 UTC 2016
Frank Cox <theatre at melvilletheatre.com>

On Mon, 29 Aug 2016 18:59:31 -0400
Pat Haley wrote:

> We noticed that all the files were owned by nobody

Here are my notes for dealing with this issue:

If all users come up as nobody on a nfs mount:

Add nfs server name to the Domain = line in /etc/idmapd.conf on both the server and the clients, i.e. Domain = nameof.server

/sbin/service rpcidmapd restart
/sbin/service nfslock restart
/sbin/service nfs restart

Also, the complete hostname as specified (nameof.server) must be in /etc/hosts on the nfs clients as well as the server

---------------
try
/usr/sbin/nfsidmap -c
on the client.
Since I put this into my /etc/rc.local , I don't have the problem any 
longer.
---------------
1) /etc/idmapd.conf
# Set domain to the domain name shared by your NFS servers.
Domain: mycompany.com
Set local-realms to the name of the nfs servers you'll be using. THIS 
WASN'T MENTIONED ELSEWHERE.
Local-Realms: nfs1.mycompany.com,nfs2.mycompany.com
# make the above changes on all the servers in question.

2) /etc/hosts: list with all the NFS servers you specified in local-realms above. This way DNS errors don't make your servers get hung
1.2.3.4    nfs1.mycompany.com
1.2.3.5    nfs2.mycompany.com

3) Make sure you synchronize your /etc/passwd files so that the account 
IDs match up or you'll get very strange results.

4) Reboot EVERYTHING. Restarting services was not enough. 
For documentation's sake, I restarted rpcidmapd, nfslock, and nfs, but didn't get the correct permissions until reboot. It doesn't seem important to run the nfs service on the 
clients.

5) Client mount:
# CLI
/bin/mount -t nfs servername:/path/to/share /local/mount/point

# /etc/fstab
servername.com:/path/to/share    /local/mount/mount nfs ro,nolock    0 0

# mount -a


-- 
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com