关于 nfs server 和 nfs client 的权限控制问题

343 天前
 Noicdi

在这里想请教各位关于 nfs 的权限控制问题。先行拜谢。

现在有一台 Linux 服务器,作为 nfs server ,启用了 nfsv4 ,共享目录是 /nfs 。有一个用户 userA(uid=1050),两个用户组 groupA(gid=1050)、groupB(gid=1051)。

/nfs 的权限列表如下,可以看到 groupA 拥有读写权限,groupB 拥有读权限。

# file: nfs/
# owner: userA
# group: groupA
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:groupB:r-x
default:mask::r-x
default:other::r-x

现在还有一台 Linux 服务器作为 nfs client ,也创建了这两个用户组,同样的 gid 。client 上有很多用户,分别附属到这两个不同的组中,想要实现不同的权限控制,应该如何设置呢?

nfs server 上的 /etc/exports 设置如下,但是没办法实现

/nfs [nfs client IP](rw,root_squash,no_all_squash,anonuid=1050,anongid=1050)
/nfs @groupA(rw,root_squash,no_all_squash)
/nfs @groupB(ro,root_squash,no_all_squash)
223 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/954873

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX