nfsv4 掛載文件溺健,由于屬組在本地不存在,導(dǎo)致文件屬組屬主為nobody的問題
在掛載端,不存在nfs空間中文件的屬組和屬主的情況:
nfsv3可以直接掛載鞭缭,顯示的是源文件的uid
nfsv4直接掛載剖膳,會(huì)顯示文件的屬組和屬主為nobody
[root@localhost ~]# mount 192.168.0.239:/ftstest/666 /mnt/
[root@localhost ~]# cd /mnt/
[root@localhost mnt]# ll
總用量 32087132
drwxr-xr-x 3 nobody nobody 4096 11月 7 01:30 10
drwxr-xr-x 3 nobody nobody 4096 11月 7 03:31 11
drwxr-xr-x 3 nobody nobody 4096 11月 7 05:44 12
drwxr-xr-x 4 nobody nobody 4096 11月 6 21:25 2
drwxr-xr-x 3 nobody nobody 4096 11月 7 02:31 3
drwxr-xr-x 3 nobody nobody 4096 11月 7 00:31 4
drwxr-xr-x 3 nobody nobody 4096 11月 7 04:34 6
drwxr-xr-x 3 nobody nobody 4096 11月 6 21:25 8
-rw-r--r-- 1 root root 32857178075 8月 28 15:20 d5000.tar
drwx------ 2 nobody nobody 4096 11月 6 21:25 lost+found
drwxr-xr-x 13 nobody nobody 4096 11月 7 00:31 usr
查看nfs版本
[root@localhost mnt]# nfsstat
Client rpc stats:
calls retrans authrefrsh
41 0 41
Client nfs v4:
解決:可以在nfsv4的客戶端,使用nfsv3去連接nfs服務(wù)器
[root@localhost /]# mount -t nfs -o vers=3 192.168.0.239:/ftstest/666 /mnt/
[root@localhost mnt]# ll
總用量 32087132
drwxr-xr-x 3 503 503 4096 11月 7 01:30 10
drwxr-xr-x 3 503 503 4096 11月 7 03:31 11
drwxr-xr-x 3 503 503 4096 11月 7 05:44 12
drwxr-xr-x 4 503 503 4096 11月 6 21:25 2
drwxr-xr-x 3 503 503 4096 11月 7 02:31 3
drwxr-xr-x 3 503 503 4096 11月 7 00:31 4
drwxr-xr-x 3 503 503 4096 11月 7 04:34 6
drwxr-xr-x 3 503 503 4096 11月 6 21:25 8
-rw-r--r-- 1 root root 32857178075 8月 28 15:20 d5000.tar
drwx------ 2 503 503 4096 11月 6 21:25 lost+found
drwxr-xr-x 13 503 503 4096 11月 7 00:31 usr
[root@localhost mnt]# cd /
[root@localhost /]#