GNOME Bugzilla – Bug 741471
gvfs-mount, Error creating proxy: The connection is closed (g-io-error-quark, 18)
Last modified: 2015-01-20 22:56:34 UTC
As root user, gvfs-mount fails. [root@f21m ~]# gvfs-mount -l Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Works with a regular user (in group wheel, but without sudo). [chris@f21m ~]$ gvfs-mount -l Drive(0): Samsung SSD 840 EVO 250GB Type: GProxyDrive (GProxyVolumeMonitorUDisks2) Drive(1): MATSHITADVD-R UJ-8A8 Type: GProxyDrive (GProxyVolumeMonitorUDisks2) Drive(2): SD16G Type: GProxyDrive (GProxyVolumeMonitorUDisks2) Seems like it should work in any case.
Created attachment 292653 [details] strace
Created attachment 292654 [details] valgrind
Running gvfs as the root user like this is not supported because a proper session is needed for dbus, etc. See "Running applications under root" at https://wiki.gnome.org/Projects/gvfs/doc Thanks
As noted above, running gvfs as root during a normal session is not supported, however, I don't think the error message is correct. From https://bugzilla.gnome.org/show_bug.cgi?id=708786#c18 is there a segfault in the logs? Are you running the entire session as root?
The crash is on the other side of the bus, i.e. debugging gvfs-mount is pointless. dmesg could show you any crashers or e.g. abrt can catch them. That way you'd discover names of the crashing processes and start debugging.
(In reply to comment #4) There's no segfault in the logs, the gnome-shell session is non-root user (who happens to be in group wheel). This is how to reproduce: 1. Boot 2. Login (as an admin user, haven't tested with non-admin) 3. Launch Terminal 4. su 5. gfvs-mount -li Error creating proxy: The connection is closed (g-io-error-quark, 18) No kernel messages, nothing reported in journalctl -f (while running that as root, so I should be seeing all possible messages).
The problem here is that "su" leaves the environment as is, so gvfs-mount tries to connect to the admin user's dbus and dbus itself closes the connection. Using "su -" or sudo is cleaner because it uses a fresh environment which means that gvfs-mount does not try to connect to another user's dbus. The default dbus policy is to disallow connections from other users although I think this can be changed. Each "connection closed" line comes from trying to connect to each volume monitor, and failing. I don't think there's much that can be done here, gvfs is simply reporting the error that it gets... there's no segfault or anything.