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.
$ 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
$ sudo chmod +x /mnt $ sudo mount -t nfs -o proto=tcp,port=2049 192.168.60.101:/ /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 192.168.60.101 Export list for 192.168.60.101: /export/Public101 192.168.60.0/24 /export 192.168.60.0/24
Even when I
su and try to
cd /mnt/Public101 I get
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
#Local Share /mnt/data/Public101 /export/Public101 none bind 0 0
# NFS imports 192.168.60.101:/ /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 /export 192.168.60.0/24(rw,fsid=0,insecure,no_subtree_check,sync) /export/Public101 192.168.60.0/24(rw,nohide,insecure,no_subtree_check,sync)
$ mount 192.168.60.101:/ on /mnt type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576, namlen=255,hard,proto=tcp,timeo=600,retrans=2, sec=sys,clientaddr=192.168.60.102, local_lock=none,addr=192.168.60.101)
UPDATE: On server changed owner from root to pete. No change on client, still denied.
/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.