Ubuntu – the difference between “Connect to server…” and sshfs

gvfssshsshfs

Can anyone quickly explain the technical difference between these two methods?

  • Going to Places -> Connect to Server and select SSH (in GNOME)
  • Using sshfs in terminal

This probably boils down to GVFS (using FUSE) vs. FUSE "directly" (if this is a reasonable comparison). FUSE I somewhat understand what is, but GVFS is a bit cryptic.

Both have advantages and disadvantages for me. The former allows easy access to the GUI and you get the opportunity to create a bookmark, but sends you to the root folder of the remote file system (unless you specify otherwise) and mounts in ~/.gvfs/sftp on ... / which an be a bit cumbersome if you want to enter through local terminal. The latter must be done via the terminal (as far as I know) but you can choose which folder you want to "jump into" and one can choose for yourself where this will be mounted on your local filesystem.

One thing that I find very annoying is that Vim/Gvim destroys permissions on files upon writing if I use GVFS. E.g. if a file permissions has 644, this is set to 600 after Vim/Gvim has edited it. I've seen various bug reports from 2008 on this but I still experience it.

Best Answer

Well gnome network connections are gvfs only, not fuse at all. They have no mount points. In order to save and load files from them you need to use a program that supports the GIO calls, which sucks for programmers and means they don't work for KDE apps.

The fuse filesystem on the other hand has an actual mount point, so it's easy to see where the files are and it obays normal UNIX logic for saving and loading files. Any application can save and load from the filenames.