1

I have mounted an NFS network share successfully using Webmin. The share seems to be mounted correctly and working correctly. If I login as root I can browse the share just fine.

However, I cannot seem to give another user access to read/write to this network share. When I look at the permissions I can see that it is owned by root and the group crontab can use the share.

$ ls -las

4 drwxr-xr-x   3 root root    4096 Nov 11 23:35 .
4 drwxr-xr-x  23 root root    4096 Nov 11 23:35 ..
8 drwxrwx---+ 23 root crontab 4096 Feb 15  2013 private

I tried giving a user access by adding them to the crontab group. However the user could not access the share.

$ groups

scott adm cdrom sudo dip plugdev crontab lpadmin sambashare

$ cd private/

-bash: cd: private/: Permission denied

So just to see whats going on I changed the user to the owner. The user could then access the share. Cool, but why didn't the group permissions work?

$ sudo chown scott:crontab private/    
$ ls -las

4 drwxr-xr-x   3 root root    4096 Nov 11 23:35 .
4 drwxr-xr-x  23 root root    4096 Nov 11 23:35 ..
8 drwxrwx---+ 23 scott crontab 4096 Feb 15  2013 private

How do I get the NFS mounted share to be accessible by any user in the group crontab?

Note: I originally posted this question on ubuntu's stack but I'm not getting any responses.

4

1 回答 1

0

我能够通过将用户组添加到 ACL 来解决这个问题。我还修改了默认组权限,以便将来也可以访问新文件。

拳头安装acl

sudo apt-get install acl

更改了权限

sudo setfacl -d -Rm g:nas:rwx  private/

# -d to change the directory default.
# -R for recursive
# -m g:nas:rwx to add the group to the ACL list for folder private/

我验证了更改:

sudo getfacl private/
于 2013-11-12T19:20:12.950 回答