挂载 NFS 导出时访问被拒绝
- Views:
- 65
- Visibility:
- Public
- Votes:
- 0
- Category:
- ontap-9
- Specialty:
- nfs<a>2009048359</a><a>进行翻译</a>
- Last Updated:
适用场景
- ONTAP 9
- NFSv4
- RHEL 7
问题描述
- 在 RHEL 客户端上将 NFSv4 导出挂载为 root 失败:
# mount -vv -o nfsvers=4.0,sec=sys nfsserver:/rootjunction/directory1/ /mnt/tmpmnt/
mount.nfs: timeout set for Thu Jan13 12:19:34 2022
mount.nfs: trying text-based options 'sec=sys,vers=4.1,addr=192.168.0.2,clientaddr=192.168.0.3'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'sec=sys,vers=4.0,addr=192.168.0.2,clientaddr=192.168.0.3'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting nfsserver:/rootjunction/directory1
- 可能已成功通过 NFSv3 进行挂载
- 在中
vserver nfs show
NFSv4
已启用mount-as-root
已启用NFSv4-id-domain
设置为用户的域- 默认用户为
nobody
- Linux 访问 UNIX 安全模式卷不需要名称映射,需要配置用户 / 组和权限:
cluster1::*> vserver security file-directory show -vserver nfsserver -path /rootjunction Vserver: nfsserver File Path: /rootjunction File Inode Number: 64 Security Style: unix Effective Style: unix DOS Attributes: 10 DOS Attributes in Text: ----D--- Expanded Dos Attributes: - UNIX User Id: 0 UNIX Group Id: 0 UNIX Mode Bits: 2750 UNIX Mode Bits in Text: rwxr-s--- ACLs: -
- 导出策略已配置根强制转换
cluster1::> vserver export-policy rule show -vserver sv1 -policyname nfsexport -ruleindex 2 -instance
Vserver: nfsserver
Policy Name: nfsexport
Rule Index: 2
Access Protocol: nfs4
List of Client Match Hostnames, IP Addresses, Netgroups, or Domains: 192.168.0.0/24
RO Access Rule: any
RW Access Rule: any
User ID To Which Anonymous Users Are Mapped: 65534
Superuser Security Types: none
Honor SetUID Bits in SETATTR: true
Allow Creation of Devices: true
- 如果要挂载的目录具有执行权限,则此操作将成功