In order to allow a regular user to mount NFS share, you can do the following.
On the NFS client host (e.g., 10.1.1.20), update /etc/fstab as root.
10.1.1.10:/export/alice /home/alice/Desktop/mnt nfs rw,noauto,user 0 0
In the above, "user" allows a non-root user to mount, and "noauto" means no automatic mount on boot.
On the NFS server host (e.g., 10.1.1.10), enable export for the client as root.
If you want to enable export non-permanently (which is not persistent across reboots):
If you want to enable export permanently (which is persistent across reboots):
Now you can log in as "alice" on the NFS client host, and do NFS mount as follows.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to back up a WordPress website to remote cloud storage from the Linux command line - November 24, 2015
- How to access Dropbox from the command line in Linux - November 22, 2015
- How to send email notifications using Gmail SMTP server on Linux - November 9, 2015