I have installed NFS on a server in my lab, the server exports two disks, /disk1 and /disk2, i can successfully see the exported drives using:
showmount -e 192.168.1.245
I can also mount the drives:
mount 192.168.1.245:/disk1 /disk1
This gives me a mounted drive on my local machine (also NetBSD 9.3) /disk1
However, I am not able to add, delete or modify files, i get:
touch: notes.txt: Permission denied
The local folder used for the mount point is owned by the user user (non-root) the mount point on the server for /disk1 and /disk2 is also owned by a user called user (non-root), same group and uid, 1000 and 100.
This is my /etc/exports file:
/data1 -alldirs -mapall=1000:100 -network 192.168.1.245 -mask 255.255.255.0
/data2 -alldirs -mapall=1000:100 -network 192.168.1.245 -mask 255.255.255.0
I have tried mounting as root, both locally and on the server, I have also tried the same thing as user, nothing seems to help, any help is greatly appreciated!
Update I do not know what fixed it, but everything is working now, I have tried unmounting the drives and mounting again, restarting the server etc. everything still works, same /etc/exports file, no changes, same users and rights.
/etc/exports
(see exports(5)) default to read/write mode (adding the-ro
option to an entry changes this).