使用选项“-w”(读写)成功安装“ro nfs share”

问题描述 投票:0回答:0

我在 machine_1 上有一个 nfs 共享

[root@localhost ~]# cat /etc/exports
"/root/nfs_001"  *(ro,all_squash,anonuid=65534,anongid=65534,no_subtree_check,insecure,async)

我将其安装在machine_2上

[root@localhost ~]# mount -t nfs -w "12.1.1.2:/root/nfs_001" /mnt/nfs_001

它没有返回错误

[root@localhost ~]# mount
12.1.1.2:/root/nfs_001 on /root/tmp_mnt/12.1.1.2/nfs_001 type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=12.1.1.1,local_lock=none,addr=12.1.1.2)

只有当我想访问时才显示权限被拒绝

[root@localhost ~]# ls -l /root/tmp_mnt/12.1.1.2/nfs_001
ls: cannot open directory /root/tmp_mnt/12.1.1.2/nfs_001: Permission denied

当我想用'rw'挂载但它只有'ro'时,如何使挂载失败?

centos mount nfs
© www.soinside.com 2019 - 2024. All rights reserved.