For local filesystems,
root usually has full access (read/write) to directories/files inside of it.
But for NFS directory mounted from network,
root usually has no permission to write to directories or files within the NFS directory. How to make
root act similarly in an NFS directory to the behavior in local directories?
The reason that NFS directory is non-accessible to
root is likely
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.
root_squash, set the
no_root_squash option. It turns off root squashing. But it is suggested to only use this option when it is suitable and necessary.
For example, to disable
/mnt/a. The line in
/etc/exports can be: