无法读取客户端上已安装的 NFS 共享

无法读取客户端上已安装的 NFS 共享

我在读取 NFS 安装时遇到一些问题。

我有服务器1和客户端1。它们都是 SLES 12 SP1。

服务器1:

server1:/ # cat /etc/exports
/usr/zap/trans  *(rw,root_squash,sync,no_subtree_check)

server1:/ # ls -ld /usr/zap/trans
drwxrwx--x 13 root zapsys 4096 Feb 29 18:46 /usr/zap/trans

server1:/ # exportfs -av
exporting *:/usr/zap/trans

我可以在 client1 上毫无问题地挂载 NFS 共享:

client1:/ # mount -v -t nfs4 server1:/usr/zap/trans /mnt
mount.nfs4: timeout set for Thu Jun 30 22:32:09 2016
mount.nfs4: trying text-based options 'addr=10.1.2.4,clientaddr=10.1.2.3'

client1:/ # mount | grep server1
server1:/usr/zap/trans on /mnt type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.1.2.3,local_lock=none,addr=10.1.2.4)

client1:/ # ls -ld /mnt
drwxrwx--x 13 root zapsys 4096 Feb 29 18:46 /mnt

Rpcinfo 和 showmount 也可以正常工作:

client1:/ # rpcinfo -p server1
   program vers proto   port  service
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100024    1   udp  61493  status
    100024    1   tcp  32256  status
    100005    1   udp  20048  mountd
    100005    1   tcp  20048  mountd
    100005    2   udp  20048  mountd
    100005    2   tcp  20048  mountd
    100005    3   udp  20048  mountd
    100005    3   tcp  20048  mountd
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    3   tcp   2049  nfs_acl
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    3   udp   2049  nfs_acl
    100021    1   udp  26684  nlockmgr
    100021    3   udp  26684  nlockmgr
    100021    4   udp  26684  nlockmgr
    100021    1   tcp  22369  nlockmgr
    100021    3   tcp  22369  nlockmgr
    100021    4   tcp  22369  nlockmgr
client1:/ # showmount -e server1
Export list for server1:
/usr/zap/trans *

问题是当我尝试读取 client1 上已安装目录的内容时,我的权限被拒绝。但是,我可以列出特定目录,如下所示:

client1:/ # ls -l /mnt
ls: cannot open directory /mnt: Permission denied
client1:/ # ls -l /mnt/lost+found
ls: cannot open directory /mnt/lost+found: Permission denied
client1:/ # ls -ld /mnt/lost+found
drwx------ 2 root root 16384 Feb 29 12:51 /mnt/lost+found
client1:/ # ls -l /mnt/tmp
ls: cannot open directory /mnt/tmp: Permission denied
client1:/ # ls -ld /mnt/tmp
drwxrwx--x 2 root zapsys 4096 Feb 29 18:46 /mnt/tmp

我不明白为什么会发生这种情况。有人有线索吗?

相关内容