Linux – NFS mount Permission denied

linuxnfsnfs4permissions

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 owner nas:nas and the same rights drwxrwx--- on the client system. But still if I try to cd nextcloud/ into it all I get is:

cd: nextcloud/: Permission denied

Did I miss something?

Best Answer

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/