Skip to main content

nfs v4: Nobody Ownership

(21 January 2013)

Problem

When I look at the files exported from my CentOS 6 server, everything's owned by "nobody".

On the server, you'll see error messages like:

Jan 21 12:47:31 centos6-7 nfsidmap[5071]: nss_getpwnam: '$USER@localdomain' does not map into domain '$SOMEDOMAIN'

Solution

There are a couple of things you can do:

  • check that there is an explicitly set domain name in /etc/resolv.conf
  • check that the "Domain =" line in /etc/idmapd.conf is set explicitly to the local DNS domain name
  • check that the name of the local machine appears in /etc/hosts. This is necessary because the networking stack starts before NIS or LDAP is available, so just having that information there is not good enough. If you mess with /etc/hosts, a reboot is usually required.