I am trying to setup NFS, i have run into some problems with regards to /etc/exports
When the content of my /etc/exports file is this:
/data1 192.168.1.213(rw)
I get this from showmount -e 192.168.1.245
client$ showmount -e 192.168.1.245
Exports list on 192.168.1.245:
client$
But when i have this in my /etc/exports file:
/data1 -alldirs -network 192.168.1.245 -mask 255.255.255.0
/data2 -alldirs -network 192.168.1.245 -mask 255.255.255.0
from here: https://www.netbsd.org/docs/guide/en/chap-net-services.html
I get this from showmount -e 192.168.1.245
client$ showmount -e 192.168.1.245
Exports list on 192.168.1.245:
/data2 192.168.1.245
/data1 192.168.1.245
I can mount data1 and data2 on my client machine (also NetBSD 9.3) but I get permission denied when I try to copy files, mkdir etc
Reading this: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/exporting-nfs-shares_managing-file-systems i understand that this is the general format of /etc/exports:
export host(options)
What i would like to achieve is the following: every machine on the network (192.168.1.*) regardless of what user connects can mount whatever mount point NFS on my server (192.168.1.245) offers with read and write privileges
Reading the RedHat documentation I understand that it´s something like:
/data1 host(rw,all_squash,anonuid=1000,anongid=100)
gid and uid is set to match my user named user (non-root)
But I am not sure what to do from here.
Update The accepted answer solved the problem, I am now facing permission issues: NetBSD 9.3 - NFS Permissions