I wanted to share a directory that was on my local computer to a remote computer named
medusa using NFS. I did the setup of the NFS server on my local computer and NFS client on the remote computer as described here. However, when I mounted the NFS share on the remote computer, I got this error:
$ sudo mount /mnt/my_nfs_share mount.nfs: access denied by server while mounting my-local-computer:/path/i/shared
This turned out to be tricky one! The error message is quite a bit misleading because it turned out that the problem had nothing to do with access. Turns out this remote computer
medusa had two Ethernet cards and thus two IP addresses. One of the IP addresses was set to the hostname
medusa, but the NFS client was using the second IP address.
The solution was to add the second IP address
192.168.0.100 as an entry in the
/path/i/shared medusa(rw,sync,no_subtree_check) /path/i/shared 192.168.0.100(rw,sync,no_subtree_check)
The rest of the steps I repeated as described in this post. Everything worked fine and I was able to mount the NFS share on the remote computer.
Tried with: Ubuntu 14.04