My error is:

mount.nfs4: access denied by server while mounting fileserver:/export/path/one

My question is:

where would the detailed log information be on the server (under systemd)?

More information:

I asked a similar question from the Ubuntu client perspective on AskUbuntu. My focus in this question is on the Arch Linux server. In particular, I am looking for logs on the server that will help me understand the problem.

Here's the background:

Our small LAN is running an Arch Linux NFS v4 file server. We have several clients running Ubuntu 15.10 and 16.04. We have one client running Ubuntu 14.04. The 14.04 client will not connect to the file server. The others all connect fine. The settings are the same on all clients. And all clients are listed in /etc/exports on the server.

I need to find more detailed error information on the Arch linux server. However, journalctl does not show anything related to nfs and it does not contain any entries that are related to the nfs access denied errors.

The 14.04 client can ping the fileserver as well as log in via SSH. The user name / ID as well as group match. (I'm using the same user account / uid on both client and server. It is uid 1000.)

Even more info:

$ sudo mount -a (on client)

mount.nfs4: access denied by server while mounting fileserver:/export/path/one
mount.nfs4: access denied by server while mounting fileserver:/export/path/two

$ ping fileserver (on client)

PING fileserver ( 56(84) bytes of data.
64 bytes from fileserver ( icmp_seq=1 ttl=64 time=0.310 ms

$ ssh fileserver (client successfully logs into the LAN-based fileserver)

Last login: Tue Aug 16 14:38:26 2016 from
[me@fileserver ~]$ 

$ showmount -e fileserver (on client)

Export list for fileserver:

$ rpcinfo -p fileserver (on client)

program vers proto   port  service
100000    4   tcp    111  portmapper
100000    3   tcp    111  portmapper
100000    2   tcp    111  portmapper
100000    4   udp    111  portmapper
100000    3   udp    111  portmapper
100000    2   udp    111  portmapper
100024    1   udp  58344  status
100024    1   tcp  58561  status
100005    1   udp  20048  mountd
100005    1   tcp  20048  mountd
100005    2   udp  20048  mountd
100005    2   tcp  20048  mountd
100005    3   udp  20048  mountd
100005    3   tcp  20048  mountd
100003    4   tcp   2049  nfs
100003    4   udp   2049  nfs

$ sudo mount -vvv -t nfs4 fileserver:/export/path/one /path/one/

mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "fileserver:/export/path/one"
mount: node:  "/path/one/"
mount: types: "nfs4"
mount: opts:  "(null)"
mount: external mount: argv[0] = "/sbin/mount.nfs4"
mount: external mount: argv[1] = "fileserver:/export/path/one"
mount: external mount: argv[2] = "/path/one/"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
mount.nfs4: timeout set for Tue Aug 16 16:10:43 2016
mount.nfs4: trying text-based options 'addr=,clientaddr='
mount.nfs4: mount(2): Permission denied
mount.nfs4: access denied by server while mounting fileserver:/export/path/one

The fileserver can ping the client.

  • Your showmount -e is showing a / character at the end of each directory. That might be confusing things. On fileserver ensure your exports says /export/path/one and not /export/path/one/ – Stephen Harris Aug 17 '16 at 0:02
  • I made the change to remove trailing slash from /etc/exports. I ran exportfs -ra and systemctl restart nfs-server.service. I still get the same error on the client. – MountainX Aug 17 '16 at 0:07
  • If you try to mount fileserver:/path/one , does that work? – Mark Plotnick Aug 17 '16 at 11:01
  • @MarkPlotnick - no, mount fileserver:/path/one does not work. Trying different permutations of the trailing slash doesn't seem to have any effect. – MountainX Aug 19 '16 at 5:27
  • OK. With NFSv4, it's customary to omit the /exports portion of the path when asking to mount the filesystem. – Mark Plotnick Aug 19 '16 at 13:36

I was having exactly the same problem, with both client and server Arch linux. The solution was to use the hostname in /etc/exports instead of the IP address. I changed this:

/srv/nfs 192.168.10(rw,fsid=root,no_subtree_check)
/srv/nfs/media 192.168.10(rw,no_subtree_check)
/srv/nfs/share 192.168.10(rw,no_subtree_check)

To this:

/srv/nfs iguana(rw,fsid=root,no_subtree_check)
/srv/nfs/media iguana(rw,no_subtree_check)
/srv/nfs/share iguana(rw,no_subtree_check)

This resulted in a slightly different problem:

[root@iguana data]# mount -t nfs4 frog:/srv/nfs/media /data/media
mount.nfs4: Protocol not supported

I don't have a lot of experience with NFS4; apparently you are not supposed to include the NFS root path in the mount command. This finally worked and mounted the volume:

[root@iguana data]# mount -t nfs4 frog:/media /data/media

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.