NFS mount Permission denied
I'm not fully sure about your current configuration(maybe you can post some output from your config files).Maybe you can post some details about the users on both machines, the rights they have, groups created,
But mainly there are 2 issues that occur all the time when it comes to NFS rights:
http://nfs.sourceforge.net/nfs-howto/ar01s07.html#pemission_issues
Also, this might be a "stupid" answer, but make sure you restarted the systems (or the services) correctly in order to sync them.
Maybe also change nfs=4 to nfs4 (not sure if this affects anything, but I've never seen nfs=4 in fstab configs).
https://www.systutorials.com/docs/linux/man/8-nfsidmap/
Related videos on Youtube
![TiMESPLiNTER](https://i.stack.imgur.com/F5Mt3.jpg?s=256&g=1)
TiMESPLiNTER
Code is poetry ...but Wordpress is not. Code samples I write in my answers require at least PHP 5.5 to run properly.
Updated on September 18, 2022Comments
-
TiMESPLiNTER almost 2 years
I created a user and a group with the same uid and gid on the NFS server and the NFS client side.
The export on the server side looks like this:
/volume1/nextcloud *(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
I mount the NFS share from the server on the client side in the
/etc/fstab
:192.168.1.60:/volume1/nextcloud /mnt/nas/nextcloud nfs rw,user,vers=4 0 0
The folder on the NAS server has the rights:
drwxrwx--- 12 nas nas 4096 Jul 7 11:11 nextcloud
When I then run
sudo mount -a
the share gets mounted without any error. I also see that the mounted share has the same ownernas:nas
and the same rightsdrwxrwx---
on the client system. But still if I try tocd nextcloud/
into it all I get is:cd: nextcloud/: Permission denied
Did I miss something?
-
TiMESPLiNTER almost 6 yearsI just saw that there's
anonuid=1025,anongid=100
in the exports line (this gets generated by my NAS). I now chowned the folder by 1025:100 which is on my NAS guest:users and if I now add my user on the client side to the group 100 (users) I can access the files. Still it's questionable how I export as not-guest but that's a Synology related thing I guess) -
Adrian almost 6 yearsIf I may ask, how are you going to manage the Users and Groups? I was thinking that you would have an LDAP server for example to manage the users/groups for you and via NFS you only export the disks. The permissions and access would be part of LDAP. : cs.wcupa.edu/rkline/linux/ldap-nfs.html
-
TiMESPLiNTER almost 6 yearsSynology does only offer SYS or Kerberos security options. So I guess I can‘t do it using ldap?
-
Adrian almost 6 yearsNot sure if this is the case, but I do see an option to enable LDAP for the NAS: synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/…
-
TiMESPLiNTER almost 6 yearsOh okay maybe I didn‘t see the option because ldap is not active which would make sense. However setting up and configuring an ldap service is a total different story. I guess my NFS problem is solved. Thanks for your help! :-)
-
kofemann almost 6 years@TiMESPLiNTER please write an answer to your solution and accept it that other clearly see it.