Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an NFS/NIS based file system. NFS and NIS servers are on different physical machines. When we log into our head node home directories are automounted. When logged in as a user I can write changes in my home directory. However, when I su root and try and write to my home directory I get a permission denied error.

Any ideas? Directories are mounted as rw (from the output of mount) on /home/alex type nfs (rw,addr=

On the NFS server the /etc/exports defines the mounted /home directory (which contains each users home directory) as rw. I have a feeling I remember reading about you can set a flag so mounted NFS directories cannot be written to as a root?

share|improve this question
up vote 5 down vote accepted

This is usually caused by the configuration on the NFS server. NFS servers will often map UID 0 (root) to another user such as "nobody" or "nfsnobody". You need to specify on the NFS server which clients are allowed root access to the mount. On Linux, you usually need to specify no_root_squash in the /etc/exports file where the export is defined.

For example:

/data1/home        <mynfsclient.ip.or.dnsname>(rw,no_root_squash)


/data1/home       rw,no_root_squash

After this is set up, unmount and remount the export on the client and you should be able to access it as root.

share|improve this answer
Hmmm - do I need to do anything else other than update the /etc/export file? I've done that, logged out and logged back in (which autodismounts/automounts) the client, and still nothing. However, I'm sure this is the right track - thanks. – Alex Jun 9 '13 at 19:58
Double check that it was actually unmounted. Autofs will usually keep things mounted for 10-15 minutes after you log out. You could cd out of your home, manually unmount it, restart autofs/automount, then log in again to be sure. The only other thing I can think of might be the mount options on the client if there are options that aren't listed in the mount command output. – Isaac Freeman Jun 17 '13 at 18:09
I can't confirm this, because if I unmounted everything I'll kill a massive number of jobs being run on our cluster, but I'm sure you're right. Even when I log out, other directories inside the parent directory stay mounted, so I bet that's the issue. Thanks. – Alex Jun 22 '13 at 18:08
This was it in my case. Thanks a bunch. – Doc Feb 7 '14 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .