Score:0

NFS in Ubuntu not following /etc/exports

in flag

I am trying to setup NFS on a server. I have used NFS in the past, and not really had much problem with it, but for some reason I do in Ubuntu server 20.04.

I have added some test paths while setting it up, but they are not working as they should. I startet by adding a single /share path to test the connection. I later changed this to /share/data, but could not mount it for some reason. I could however still mount /share, although this was no longer defiend in /etc/exports. I had executed both exportfs -a and systemctl restart nfs-kernel-server, so I tried rebooting the server, still no luck.

I then tried adding /data/share, and for some reason I am able to mount both /data and /data/share, which is definitely not the correct behaviour. The /share/data location still does not work, although it is defined while /share works without being defined.

So to sum up.

  1. /share/data is not working, but defined in exportfs.
  2. /share is working, but not defined in exportfs.
  3. /data and /data/share is working, but only /data/share is defined.

I have no idea what's wrong with this thing?

Here is some info from the server:

$ cat /etc/exports
/share/data    192.168.2.57(rw,sync,no_subtree_check)
/data/share   192.168.2.57(rw,sync,no_subtree_check)

$ exportfs -s
/share/data  192.168.2.57(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
/data/share  192.168.2.57(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)

When trying to mount on the host:

$ mount 192.168.2.56:/share/data /mnt && echo mounted...
mount.nfs: access denied by server while mounting 192.168.2.56:/share/data

$ mount 192.168.2.56:/share /mnt && echo mounted...
mounted...

$ mount 192.168.2.56:/data/share /mnt && echo mounted...
mounted...

$ mount 192.168.2.56:/data /mnt && echo mounted...
mounted...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.