如何为用户和组授予NFS共享权限

时间:2019-04-18 19:46:53

标签: permissions nfs

情况:Synology NAS(DSM 6.2.1-23824更新6)我在NAS上创建了一个共享文件夹并启用了NFS-无映射,异步,交叉安装。

在Ubuntu服务器上:

我挂载了NFS共享/ nfs

我已将用户添加到服务器-sudo adduser scott

我创建了一个组-sudo groupadd mylab

我已将用户添加到mylab组-sudo usermod -aG mylab scott没有权限

我在服务器NFS共享挂载/ nfs sudo mkdir / nfs / scott上为新用户创建了一个新目录

我更改了所有者和新用户目录的组-sudo chown -R scott:mylab / nfs / scott

Eric向新用户目录添加权限-sudo chmod -R 750 / nfs / scott

运行ls -l检查权限是否生效drwxr-x --- 1 scott mylab 0 Apr 18 13:26 scott

i使用新的用户凭据(斯科特)登录Ubuntu服务器。

问题是,当新用户创建新目录(在我为他创建的目录中,但更改了所有权和权限以反映他的目录)(/ nfs / scott)时,新目录具有drwxrwxr-x 1 scott scott 0 Apr 18 13: 51 scott_data

如果我尝试更改权限-sudo chmod -R 750 / nfs / scott 这就是我得到的drwxr-x --- 1 scott scott 0 Apr 18 13:51 scott_data

但是我期望得到drwxr-x --- 1 scott mylab 0 Apr 18 13:51 scott_data

所有新目录,子目录和文件如何保持相同的所有者和组?换句话说,所有新目录,子目录和文件都将继承父目录的权限,即rwxr-x --- 1 scott mylab 0 Apr 18 13:26 scott

谢谢大家的帮助-希望我不要让任何人感到困惑

0 个答案:

没有答案
相关问题