chown:更改“.”的所有权:无效参数

Pie*_*rre 8 permissions chown

当我们的系统管理员在假期时,我正在尝试在我们的新服务器上安装一些新文件:

这是我的 df

#  df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb3             273G   11G  248G   5% /
tmpfs                  48G  260K   48G   1% /dev/shm
/dev/sdb1             485M  187M  273M  41% /boot
xxx.xx.xxx.xxx:/commun
                       63T  2.2T   61T   4% /commun
Run Code Online (Sandbox Code Playgroud)

作为root,我可以创建一个新目录并chown在 /home/lindenb 下运行

# cd /home/lindenb/
# mkdir X
# chown lindenb X
Run Code Online (Sandbox Code Playgroud)

但我无法在 /commun 下运行相同的命令

# cd /commun/data/users/lindenb/
# mkdir X
# chown lindenb X
chown: changing ownership of `X': Invalid argument
Run Code Online (Sandbox Code Playgroud)

为什么 ?我怎样才能解决这个问题 ?

更新

山:

/dev/sdb3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdb1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
xxx.xx.xxx.xxx:/commun on /commun type nfs (rw,noatime,noac,hard,intr,vers=4,addr=xxx.xx.xxx.xxx,clientaddr=xxx.xx.xxx.xxx)
Run Code Online (Sandbox Code Playgroud)

版本:

$ cat /etc/redhat-release 
CentOS release 6.3 (Final)
Run Code Online (Sandbox Code Playgroud)

use*_*517 7

/commun文件系统是从远程服务器安装,并且该错误消息表明是可以是一个NFSv4安装(相同的较早版本的nfs是许可被拒绝)。默认情况下,远程文件服务器会将远程root用户映射到一个nobody帐户,因此它无法更改文件所有权。

最简单的解决方案可能是使用本地lindenb帐户在目录下创建/commun目录。所以作为根

sudo -u linedb mkdir -p /commun/data/users/lindenb
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,那么可能会发生一些 id 映射,因此您可能需要xxx.xx.xxx.xxx更改服务器上的目录并更改那里的所有权/权限。

  • 由于 root 在 NFSv3 上也被压缩,因此错误消息可能会有所不同,但他仍然无法以 root 用户身份创建目录。 (2认同)

小智 6

mount -t nfs -o vers=3 SERVER:PATH MOUNT_PATH
Run Code Online (Sandbox Code Playgroud)

这对我有用。