7

I can't connect to NFS share using nautilus "Connect to server" in "Other Location". "Connect" button seems to be disabled. Didn't find any logs related to this.

Nautilus

Already tried apt install gvfs-backends from other answer but didn't work. Mounting using mount -t nfs server.local:/srv/nfs /mnt works but I'd like to do this using nautilus and without root permissions.

2
  • I also tried to add NFS location to Nautilus manually in ~/.config/gtk-3.0/bookmarks. But when i click the bookmark i get error message "Sorry, could not display all the contents of "nfs": The specified location is not supported".
    – user850541
    Dec 24, 2018 at 22:18
  • 1
    Ubuntu broke this by omitting the gvfs-nfs package. Source: bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1637988
    – Fuzzy76
    Mar 30, 2020 at 12:50

3 Answers 3

1

Since this has not been solved in any meaningful way, here's what I found:

First of all, you can navigate to an NFS server either through the "Other locations" tab or by pressing ctrl+l and typing in the location:

nfs://host/exposed/path

If you try that you can be met with the following error message:

enter image description here

That means that the server didn't allow the user to connect. Let's see what we have in the server logs:

ec 11 00:02:49 somehost rpc.mountd[45603]: refused mount request from x.x.x.x for /temporary (/temporary): illegal port 55520

The port number will be different because every request is made to a new endpoint. To fix that, do the following:

  1. SSH to the server
  2. Edit /etc/externals
  3. In the options for the share you want to mount, add insecure
  4. Reload the shares by running # exportfs -a (as a root user)

Done.

Normally, NFS connections on port higher than 1023 are not allowed. The insecure flag specifies that this share can be mounted insecurely (meaning on high ports).

0

Create a directory for your username under /media/ and then a directory under that to mount you nfs share. Then add the nfs mount to /etc/fstab

eg:

 # mkdir -p /media/username/nfs_share
 # chown -R username: /media/username

and then add the following to /etc/fstab

server.local:/srv/nfs   /media/username/nfs_share   nfs    user,noauto    0   0

then restart gnome files (nautilus) and it should appear in 'other locations' as your what ever you called the mount point. in this case it would appear as 'nfs_share'

You may need to kill nautilus from the command line and then re-start it because it likes to background rather than exit when you close it.

pkill nautilus

Don't use the directory /media/username as the mount point because you may want other shares and udisks may want to mount something else in there at some point.

1
  • 1
    He did say he did not want to mount it manually, but through nautilus.
    – Fuzzy76
    Mar 30, 2020 at 12:33
-2

This work for me. I went into nautilus and found /mnt/your_mount_here and dragged it over under my other drives and it created the bookmark automatically

1
  • This only creates a shortcut to the already mounted directory. I want to create a bookmark which mounts NFS folder automatically.
    – user850541
    Jan 17, 2019 at 12:10

You must log in to answer this question.