I am on Debian Jessie without desktop environment. I try to mount an FTP by command line using gvfs-mount.
I gathered information on the web and I understood that gvfs comunicates with dbus.
So my first step was to install dbus and gvfs required packages :
apt-get install dbus-x11 gvfs-bin gvfs-fuse
Then I reboot, because dbus installed its own service.
After that, I am logging in as www-data
sudo -Hu www-data -s /bin/bash
-s /bin/bash is because this user has no bash)
From here, I have to launch a
dbus-daemon for my user and export the resulting
DBUS_SESSION_BUS_ADDRESS in order for gvfs to communicate with that daemon. So I do:
dbus-launch --sh-syntax > "$HOME/.dbus_settings"
.dbus_settings contains something like:
cat .dbus_settings DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-XwbyV2BmA5,guid=6c111d728c263543b61e6293570e1f22'; export DBUS_SESSION_BUS_ADDRESS; DBUS_SESSION_BUS_PID=952;
My environment variable
DBUS_SESSION_BUS_ADDRESS is not set at this time, so I run:
In order to handle future gvfs mounts, I created a
.gvfs folder in my user
$HOME (for www-data it is
Now, I think (but I am not sure) I have all set to use gvfs. so I launch gvfsd-fuse like this:
/usr/lib/gvfs/gvfsd-fuse $HOME/.gvfs -o big_writes
That seems to work. The folder $HOME/.gvfs appears to be mounted (but there is nothing in it yet).
The last command is the effective FTP mount:
gvfs-mount ftp://myftpuser@myftpserver < file_containing_ftp_password
But, I always get this error:
Error mounting location: Location is not mountable
These steps work on my Linux Mint 17.3 amd64 desktop. But I cannot make it work on a Debian Jessie server (without desktop and x11).
Any help is appreciated.