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:


I get this from showmount -e

client$ showmount -e
Exports list on

But when i have this in my /etc/exports file:

/data1 -alldirs -network -mask
/data2 -alldirs -network -mask

from here: https://www.netbsd.org/docs/guide/en/chap-net-services.html

I get this from showmount -e

client$ showmount -e
Exports list on

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 ( 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

1 Answer 1


You can add -mapall=1000:100 to the lines in the /etc/exports file you crafted based on the NetBSD Guide.

The documentation for the exports file can be viewed on the NetBSD system by running man exports, or on the web at https://man.netbsd.org/NetBSD-9.3/exports.5

  • Great, thanks, i really appreciate you taking the time to help with this. I have altered my /etc/exports: /data1 -alldirs -mapall=1000:100 -network -mask /data2 -alldirs -mapall=1000:100 -network -mask When i try to mount using: localhost$ mount ./storage/ I get: WARNING: autoselecting nfs based on : or @ in the device name is deprecated! WARNING: This behaviour will be removed in a future release mount_nfs: bad MNT RPC: RPC: Authentication error; why = Client credential too weak Sep 27 at 21:47
  • Glad that I was able to help. It would nice if you would accept the answer as it sounds like it fixed the issue for you. Sep 29 at 6:07
  • The error you now see is likely caused by trying to run mount as a regular user instead of running it as root. Have a look at this thread about RPC Authentication Error when mounting NFS for more details. If it is still an issue, please raise it as its own question instead of asking in comments. Sep 29 at 6:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .