I'm trying to build an NFS server on my Raspberry Pi which will be writable by any server on the network. The NFS share is a directory on an external device mounted at boot:
$ cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
# This is my external device
/dev/sda1 /data ext4 defaults,nofail 0 2
I configured my /etc/exports
as follows:
$ cat /etc/exports
/data *(rw,sync,all_squash,no_subtree_check,anonuid=1000,anongid=1000)
/data/share *(rw,sync,all_squash,no_subtree_check,anonuid=1000,anongid=1000)
The User ID and Group ID of 1000 is the pi user and pi group, which owns both /data and /data/share:
$ ls -la /data
total 28
drwxrwxrwx 4 pi pi 4096 Sep 30 08:41 .
drwxr-xr-x 23 root root 4096 Oct 9 15:54 ..
drwx------ 2 pi pi 16384 Sep 25 14:57 lost+found
drwxrwxrwx 2 pi pi 4096 Sep 30 08:41 share
When I try to mount the share from my Mac, I get the following error:
$ mount 192.168.101.10:/data tmp
mount_nfs: can't mount /data from 192.168.101.10 onto /Users/davejlong/Downloads/tmp: Operation not permitted
Here is the output of exportfs -v
$ sudo exportfs -v
/data <world>(rw,wdelay,root_squash,all_squash,no_subtree_check,anonuid=1000,anongid=1000)
/data/share <world>(rw,wdelay,root_squash,all_squash,no_subtree_check,anonuid=1000,anongid=1000)
I'm not sure what I'm doing wrong with my configuration.