0

I have 2 machines with identically configured /etc/fstab's and identical versions of Ubuntu LTS. Fstab

otherhost:/otherdir /mnt/otherdir nfs defaults 0 0

When mounting an nfs client:

mount /mnt/otherdir

one machine worked and the other failed with a "access denied by server" error.

2 Answers 2

2

This is because sometimes NFSv4 does a problem with Ubuntu. I suggest you to use NFSv3 in a shared environment like that

Please edit the /etc/default/nfs-kernel-server

Edit the line as

RPCNFSDARGS="--no-nfs-version 4"

Add the following line

MOUNTD_NFS_V3="yes"

Then restart it

restart nfs-kernel-server

Test it, you will see no problem.

0

I tracked the cause to be that one was running in a VM that was configured to share its network interface with its host computer, the other was configured in bridge mode.

Only bridged mode works for nfs (as far as I can tell). After running mount -vv I found that the nfs-client sending its IP address to the nfs-server. In non-bridged mode, this IP address doesn't exist on the network (its a virtual IP address invented by the VM software). In this case the connection fails. Solution: switch the interface to bridge-mode in the VM software.

1
  • In Virtualbox I wanted to mount a folder on the host machine from the vm (using nat), and had to add 127.0.0.1 to my /etc/exports Jul 3, 2014 at 0:01

You must log in to answer this question.

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