How to allow root access to NFS?

On local filesystems, root usually has full access (read/write) to directories/files inside of it.

But for NFS directory mounted from nework, root usually has no permission to write to it. How to make root act as on local directory for NFS directory?

asked Sep 8, 2016 by anonymous

1 Answer

The reason that NFS directory is non-accessible to root is likely "root_squash".

It assigns them the user ID for the user nfsnobody and prevents root users connected remotely from having root privileges. This prevents unauthorized alteration of files on the remote server.

To disable root_swash, set the no_root_squash option. It turns off root squashing.

For example, to disable root_swash for /mnt/a. The line in /etc/exports can be:

answered Sep 19, 2016 by Eric Z Ma (44,280 points)
edited Sep 19, 2016 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost