This question already has an answer here:

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

So just to test thing out, I added crontab to my user scott.

$ groups

scott adm cdrom sudo dip plugdev crontab lpadmin sambashare

however I still can't access the share.

$ cd private/

-bash: cd: private/: Permission denied

Any ideas?

marked as duplicate by Zanna, Byte Commander, Eric Carvalho, TheWanderer, edwinksl Sep 29 '16 at 1:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • run the command as a root user. – Avinash Raj Nov 12 '13 at 6:41
  • thanks for the response, but as I said, "If I login as root I can browse the share just fine." This is not the goal, I need to give a specific user permission to access the share. – Scott Nov 12 '13 at 14:19

I was able to solve this problem by adding the user group to the ACL. I also modified the default group permissions so new files will also be accessible in the future.

Fist installed acl

sudo apt-get install acl

Changed the permissions

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/

I verified the changes:

sudo getfacl private/
  • 1
    Not that it makes much difference now, but it's probably worth noting that Linux includes an option to have the server side check for group membership rather than the client side. So, if nfsd was started with the –manage-gids option, client-side group membership doesn't matter. Applying the ACL gave access to a different group which I suspect (you said "the user group") the user may well have been a member of on the server side. – dannysauer May 20 '14 at 17:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.