8

Ubuntu 16.04. I want to know in what point of the file system tree does Nautilus file manager mounts the ftp/smb connections. I thought it could be on the same directory where external storage devices get mounted, namely /media/my_user/disk or /run/media/my_user/disk, but it is not there.

I tried to look it up on Nautilus documentation but I couldn't find anything.

I ran df -h to look up for the mount point and this is what I got:

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           785M  9.5M  775M   2% /run
/dev/sda5        64G   50G   11G  83% /
tmpfs           3.9G  114M  3.8G   3% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2        96M   29M   68M  30% /boot/efi
tmpfs           785M   80K  785M   1% /run/user/1000

So I'm guessing it is not getting mounted as a 'normal' disk.

If my knowledge about linux systems isn't mistaken, everything that I can see in my file system is mounted on the same tree. Is it somehow different when it comes to a connection to a server made by the default file manager?

2 Answers 2

6

As @grawity mentiones in his comment, the root for the child folders mounting is in:

/run/user/$UID/gvfs

You can find out the exact location by saving an HTML file such as an empty index.html and trying to open if from nautilus (or nemo). In the browser you'll see:

file:///run/user/$UID/gvfs/ftp:host=<host>,user=<user>/index.html

with filled out parts for your UID and FTP details. From there you can navigate to the parent of FTP folder and there specifically you can distinguish multiple FTP connections (and perhaps even SMB, though I don't have anything to test) in this pattern:

/run/user/$UID/gvfs/ftp:host=<host>,user=<user>

# escape before using in terminal
cd /run/user/$UID/gvfs/ftp\:host\=<host>\,user\=<user>

And with it I could run e.g.:

grep -r pattern .

though it is extremely slow due to FTP limitation and if you even have the speed capped you can go get a coffee or lunch even. In case you have some compressing option available for the files on your server via some FTP web client (running on that server), compress the files first and pull them locally.

1
  • Well done! @freddieRV It should be accepted as answer. Commented Aug 22, 2019 at 12:59
1

It is actually the last tmpfs in the list you provided. If you navigate to "/run/user/1000/" you will be in the smb folder. Or, at least smb connections mount in the /run/user/ folder. After I connected to my smb share, I ran df -h and found that mine mounted under /run/user/999/.

Now you can do symbolic links to make the /run/user/ sub-folder go to the /media/ location, but that would look like /media/1000, in this case.

I'm not one for writing a script to make changes to the system just for convenience either; so if you need a smb/ftp share accessible at all times, then I would write an entry to fstab and mount to an easily accessible location.

4
  • I doubt it. I think /run/user/1000/ is per-user tmpfs (ramdisk) mounted by systemd for user whose UID is 1000 (it's the OP in this case). When you install Ubuntu, the first regular user gets UID 1000. Commented Oct 5, 2017 at 8:52
  • I see. OP needs to connect to share and check the location under /run/user/. When I ran my live boot, and connected to a share using nautilus, that is where it mounted. Commented Oct 5, 2017 at 14:47
  • Thanks for the feedback guys. Indeed my UID is 1000. But the server connection is not mounted under /run/user/1000. I ran df before and after connection and both times the device is there, and both times there is nothing in it.
    – freddieRV
    Commented Oct 5, 2017 at 15:50
  • 3
    It's close enough – the location is /run/user/1000/gvfs, which is a FUSE mount that exposes all virtual Gvfs mounts inside. Commented Mar 23, 2019 at 9:41

You must log in to answer this question.

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