How to fix MNT3ERR_ACCES in Filestash?

Getting the MNT3ERR_ACCES error while accessing an NFS share? By default, NFS shares have the secure flag set, which makes the server only accept requests from a privileged port (which only root can open).

If a client that is not running as root attempts to connect to a server from an unprivileged port while the secure option is enabled, the server will reject the connection with MNT3ERR_ACCES.

~/$ cat /etc/exports
/srv/share *(rw,sync,no_subtree_check)
~/$ sudo exportfs -v
/srv/share     <world>(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)

The fix is to either:

  1. run the client as root (so it can use privileged ports)
  2. add the insecure flag on the server (so a client does not need to use a privileged port):
~/$ cat /etc/exports
/srv/share *(rw,insecure,sync,no_subtree_check)
~/$ sudo exportfs -ra
~/$ sudo exportfs -v
/srv/share     <world>(sync,wdelay,hide,no_subtree_check,sec=sys,rw,insecure,root_squash,no_all_squash)