Followed SettingUpNFSHowTo | Ubuntu Community Help Wiki to create share on server, pm01, & client, 4uigL1. Both are 16.04 with latest updates. 4uigL1 is a laptop AMD A8 so using 32-bit libraries; pm01 is AMD 64-bit.
On pmo1:

$ sudo mkdir -p /export/Public101
$ sudo chmod -R 777 /export
$ cd /mnt/data
$ sudo mkdir Public101
$ sudo chmod -R 770 Public101/
$ sudo chgrp -R users Public101/
$ sudo mount --bind /mnt/data/Public101 /export/Public101
$ sudo service nfs-kernel-server restart

On client, 4uigL1:

$ sudo chmod +x /mnt
$ sudo mount -t nfs -o proto=tcp,port=2049 /mnt
$ cd /mnt/Public101/
$ cd /mnt/Public101/
bash: cd: /mnt/Public101/: Permission denied
$ ll /mnt
total 12
drwxrwxrwx  3 root root  4096 Mar 22 14:46 ./
drwxr-xr-x 25 root root  4096 Dec 30 14:58 ../
drwxrwx---  2 root users 4096 Mar 22 14:49 Public101/
$ showmount -e
Export list for

Even when I su and try to cd /mnt/Public101 I get Permission denied

I prefer NFS over Samba because Samba shares haven't shown up when one tries to get a file to send over email or attach or trying to save a file on a share from some other program, like openoffice.

Thanks for any help!

This is the server's fstab:

#Local Share
/mnt/data/Public101     /export/Public101       none    bind    0       0


# NFS imports        /mnt    nfs     auto    0       0


pete@pm01:/mnt/data$ cat /etc/exports 
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
# exports


$ mount on /mnt type nfs4  

UPDATE: On server changed owner from root to pete. No change on client, still denied.

Checked /mnt on client and found the owner of /mnt/Public101 to be 'user1'. Could not change owner as root, always permission denied. Hmm. Logout of client, login as 'user1'. Accessed the share!

initially setup Xubuntu on client as 'user1' adding 'pete' as another user and using pete normally and as the main user instead of 'user1'. So now the question becomes - if user1 and pete are both in the 'users' group, why when logged in as pete can I not access the share? On boot, the client mounts the share as user1:users with 770 as permissions.

  • It's hard to read the details, can you please format the commands ? – bistoco Mar 22 '18 at 20:05
  • Can you add the contents of the /etc/exports file on the server? Can you add the output of "mount" on the client (just the relevant line) after you have mounted the share? – Sebastian Stark Mar 22 '18 at 20:08
  • It should work if you create a directory or file on the share on the server, chown it to some user, then access it from the client as the same user. – Sebastian Stark Mar 22 '18 at 20:22
  • This whole thing started when I was setting up my RPi with openmediavault when I couldn't see the NFS share but did see the samba one. So I tried going back to the 'basics'. – Peter Martin Mar 22 '18 at 20:25
  • Continuing to experiment, I ended up changing the client's permissions to 777 and I was able to get 'pete' to access it and not just 'user1'. Not the solution we need as I don't want to open it up to anyone. – Peter Martin Mar 22 '18 at 22:29

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.