V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Noicdi
V2EX  ›  问与答

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

  •  
  •   Noicdi · 319 天前 · 221 次点击
    这是一个创建于 319 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在这里想请教各位关于 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)
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2791 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:14 · PVG 20:14 · LAX 05:14 · JFK 08:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.