nfs root 无权限_如何允许root用户访问NFS?

nfs root 无权限

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

在本地文件系统上,root通常具有对其内部目录/ 文件的完全访问权限(读/写)。

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?

但是对于从nework挂载的NFS目录,root通常没有写权限 。 如何使root充当NFS目录的本地目录?

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

root无法访问NFS目录的原因可能是“ 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.

它为他们分配用户nfsnobody的用户ID,并防止远程连接的root用户具有root特权。 这样可以防止未经授权更改远程服务器上的文件。

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

要禁用root_swash,请设置no_root_squash选项。 它可以关闭根压榨。

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

例如,为/ mnt / a禁用root_swash。 / etc / exports中的行可以是:

/mnt/a 10.0.0.0/16(rw,no_root_squash)
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-allow-root-access-to-nfs/

nfs root 无权限

你可能感兴趣的:(linux,java,python,运维,hadoop)