我有一个使用NFS本地挂载的远程分区.
‘mount’给出
192.168.3.1:/mnt/storage-pools/ on /pools type nfs (rw,addr=192.168.3.1)
在我出口的服务器上:
/mnt/storage-pools *(rw,insecure,sync,no_subtree_check)
然后我试试
touch /pools/test1 ls -lah -rw-r--r-- 1 65534 65534 0 Dec 13 20:56 test1 chown root.root test1 chown: changing ownership of `test1': Operation not permitted
我错过了什么?拉出我的头发.
解决方法
默认情况下,root_squash导出选项已打开,因此NFS不允许客户端的root用户在服务器上以root身份执行操作,而是将其映射到anonuid和anongid选项指定的用户/组ID(默认值= 65534) .这可以在/ etc / exports中与其他导出选项一起配置.