5

I am trying to mount a directory from a Raspberry Pi 2 (the NFS server) from an Ubuntu 15.10 PC (the NFS client). When I try, I get the error:

mount.nfs: access denied by server while mounting 192.168.1.135:/home/pi

Here what I am doing.

On the Raspberry Pi 2 (NFS server)

Added this line to /etc/exports

/home/pi/workspace 192.168.1.*(rw,no_subtree_check,sync,root_squash)

Issued:

sudo update-rc.d rpcbind enable && sudo update-rc.d nfs-common enable

And then started the NFS server:

pi@dex ~ $ sudo service nfs-kernel-server start
[ ok ] Exporting directories for NFS kernel daemon....
[ ok ] Starting NFS kernel daemon: nfsd mountd.

On the PC (NFS client)

> showmount -e 192.168.1.135
Export list for 192.168.1.135:
/home/pi/workspace 192.168.1.*

Then I try to mount the directory, and get the error:

> sudo mount 192.168.1.135:/home/pi/workspace /home/fanta/nfs
mount.nfs: access denied by server while mounting 192.168.1.135:/home/pi/workspace

Any information I can collect to troubleshoot the issue?

Raspberry Pi 2 is running Linux dex 4.1.13-v7+, and the PC Ubuntu 15.10 64-bit.

Thanks!

1

1 Answer 1

9

You can only use * on its own or in domain names. Replace it with ip/numberofbits:

/home/pi/workspace 192.168.1.0/24(rw,no_subtree_check,sync,root_squash)

See man exports or debian handbook

Each machine can be identified either by its DNS name or its IP address. Whole sets of machines can also be specified using either a syntax such as *.falcot.com or an IP address range such as 192.168.0.0/255.255.255.0 or 192.168.0.0/24.

1
  • I had been using 192.168.1.*(flags) for YEARS without issue until I tried mounting on a Fedora VM then I got this error. I never wouldve guessed there was a problem with the server setup since its been working for years. But this fixed it immediately Feb 7, 2018 at 6:18

You must log in to answer this question.

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