How to access dolphin network mount through console?

If you unmount it, it is not mounted. And therefore mount doesn’t show it either.

The directory/mountpoint still exists, but is empty of course if nothing is mounted there.

But I don’t unmount it. Right after successful entering of credentials in gvfs-mount it is simply not listed in the directory and in the mount grep. And gvfs-copy works only after gvfs-mount, before that it gives an error message. So obviously it is mounted somehow but it is not visible. That’s what makes me wonder.

I never said you did. (that “you” was a general you, not addressing you in particular)

I just replied to your question, which was:

why doing the same what you do shows an empty /run/user/$UID/gvfs/ (although it is obviously “mounted”) and nothing in “mount | grep gvfs”

If nothing is shown by “mount | grep gvfs”, it is obviously not mounted, and therefore empty.

And if I unmount it, it is also of course not mounted here (and “mount | grep gvfs” shows nothing), and therefore it is empty.

Clear now? :wink:

Right after successful entering of credentials in gvfs-mount it is simply not listed in the directory and in the mount grep. And gvfs-copy works only after gvfs-mount, before that it gives an error message. So obviously it is mounted somehow but it is not visible. That’s what makes me wonder.

Well, gvfs-mount might talk to gvfs directly, not via /run/user/$UID/gvfs/, so it might still work even if /run/user/$UID/gvfs/ is not mounted. And of course you have to “mount” the share first via gvfs-mount. gvfs-mount obviously does not do a convential kernel mount, but it’s still necessary to “register” the share with gvfs.

As already explained, the only thing that apparently is really mounted (or not) is /run/user/$UID/gvfs/ itself, not your share (which only shows up as virtual folder in /run/user/$UID/gvfs/ to be accessible by other applications).

Does killing gvfsd help in your case?

Although, if you didn’t unmount it manually, I’d suspect that mounting /run/user/$UID/gvfs/ fails somehow in the first place.
So it probably will not work if you restart gvfsd either, I suppose.

Yes. But it is still strange why using the same software and sending the same commands works differently for you and me. As far as I understand you see something when you issue “mount " grep gvfs” no?

Well, gvfs-mount might talk to gvfs directly, not via /run/user/$UID/gvfs/, so it might still work even if /run/user/$UID/gvfs/ is not mounted. And of course you have to “mount” the share first via gvfs-mount. gvfs-mount obviously does not do a convential kernel mount, but it’s still necessary to “register” the share with gvfs.

As already explained, the only thing that apparently is really mounted (or not) is /run/user/$UID/gvfs/ itself, not your share (which only shows up as virtual folder in /run/user/$UID/gvfs/ to be accessible by other applications).

Do I understand correctly that /run/user/$UID/gvfs/ actually should appear empty and that this is the expected behavior?

Does killing gvfsd help in your case?

How do you kill it (and with what idea)? I don’t see it in “ps | axf” and “systemctl status gvfs<press tab>” shows nothing which I suppose means that there is no service with that name.

They do not work differently for you and me.

But in your case, apparently /run/user/$UID/gvfs/ is not mounted for some reason, and that causes your “problem” that that folder stays empty.

As far as I understand you see something when you issue “mount " grep gvfs” no?

Yes.

wolfi@linux-lf90:~/Desktop> mount|grep gvfs
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

Do I understand correctly that /run/user/$UID/gvfs/ actually should appear empty and that this is the expected behavior?

As long as you don’t use gvfs-mount, it is supposed to be empty, yes.

But if you “mount” a share or something else with gvfs-mount (again, this is no real mount), it is supposed to show up as virtual folder inside /run/user/$UID/gvfs/.

How do you kill it (and with what idea)?

killall gvfsd

And the idea is that it gets restarted then, and mounts /run/user/$UID/gvfs/ again.

I don’t see it in “ps | axf”

Really “ps | axf”? That doesn’t make sense at all. You probably mean “ps axf”…

wolfi@linux-lf90:~/Desktop> ps | axf
If 'axf' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf axf
wolfi@linux-lf90:~/Desktop> ps axf|grep gvfs
16590 ?        Sl     0:00 /usr/lib/gvfs/gvfsd
16595 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes

If you don’t see it, then it seems not to run in the first place, which of course would also explain why /run/user/$UID/gvfs/ is not mounted.

Maybe it crashes?
What does “sudo coredumpctl” say?

and “systemctl status gvfs” shows nothing which I suppose means that there is no service with that name.

No, there is no system-wide systemd service. It’s not a system-wide service anyway, and runs as user.

There is a user service though:

wolfi@linux-lf90:~/Desktop> rpm -ql gvfs|grep systemd
/usr/lib/systemd/user/gvfs-daemon.service
/usr/lib/systemd/user/gvfs-metadata.service

So try “systemctl --user status gvfs”.
Although there should be no need to start anything manually (they are “static” and “enabled”), and those services are actually not even running here. (actually I even get an error message if I try to start them manually)
E.g.:

wolfi@linux-lf90:~/Desktop> systemctl --user status gvfs-daemon.service 
● gvfs-daemon.service - Virtual filesystem service
   Loaded: loaded (/usr/lib/systemd/user/gvfs-daemon.service; static; vendor preset: enabled)
   Active: inactive (dead)
wolfi@linux-lf90:~/Desktop> systemctl --user start gvfs-daemon.service 
Failed to start gvfs-daemon.service: Unit dbus.socket failed to load: No such file or directory.

I mean the result of them is different obviously - you see something in the mount path, I don’t.

But in your case, apparently /run/user/$UID/gvfs/ is not mounted for some reason, and that causes your “problem” that that folder stays empty.

If it is not mounted - how is it possible that I successfully use gvfs-copy? Without first using gvfs-mount it simply refuses to work.

You probably mean “ps axf”…

Yes, sorry.

Maybe it crashes?
What does “sudo coredumpctl” say?

Here is what all commands do here:

~]: gvfs-mount smb://***/***/                      
Error mounting location: Location is already mounted
~]: mount | grep gvfs                                        
~]: ls /run/user/$UID/gvfs/
~]: killall gvfsd
~]: ps axf | grep gvfs
23635 pts/0    S+     0:00  |   |   \_ grep --color=auto gvfs
 6270 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-metadata
 6274 ?        Sl     0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 6279 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
 6285 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 6290 ?        Sl     0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
 6295 ?        Sl     0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
 6313 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.37 /org/gtk/gvfs/exec_spaw/0
 6366 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-network --spawner :1.37 /org/gtk/gvfs/exec_spaw/3
 6447 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.37 /org/gtk/gvfs/exec_spaw/9
 6731 ?        Sl     0:04 /usr/lib/gvfs/gvfsd-smb --spawner :1.37 /org/gtk/gvfs/exec_spaw/10
~]: ls /run/user/$UID/gvfs/
~]: systemctl --user status gvfs-<tab><tab>
gvfs-afc-volume-monitor.service      gvfs-goa-volume-monitor.service      gvfs-metadata.service                gvfs-udisks2-volume-monitor.service
gvfs-daemon.service                  gvfs-gphoto2-volume-monitor.service  gvfs-mtp-volume-monitor.service      
~]: systemctl --user status gvfs-daemon.service 
● gvfs-daemon.service - Virtual filesystem service
   Loaded: loaded (/usr/lib/systemd/user/gvfs-daemon.service; static; vendor preset: enabled)
   Active: inactive (dead)
~]: sudo coredumpctl 
root's password:
TIME                            PID   UID   GID SIG PRESENT EXE
... <truncated long list>
Tue 2017-06-20 11:20:41 EEST   3152  1000   100   6   /usr/bin/ksplashqml
Tue 2017-06-27 14:21:52 EEST   3044  1000   100   6   /usr/bin/ksplashqml
Fri 2017-06-30 10:55:22 EEST  10469  1000   100  11   /usr/bin/gwenview
Thu 2017-07-06 00:57:20 EEST   3020  1000   100   6 * /usr/bin/ksplashqml
Thu 2017-07-06 13:26:51 EEST  12253     0     0  11 * /usr/sbin/lightdm

The result is not different either.
The only difference is that you don’t have the virtual filesystem while I do.

If it is not mounted - how is it possible that I successfully use gvfs-copy? Without first using gvfs-mount it simply refuses to work.

As I already wrote.
It is part of gvfs, so it knows how to access your share (but only after you registered the share via gfvs-mount).

/run/user/$UID/gvfs/ is just for “compatibility” with other applications that do not support gvfs directly, I suppose.

Here is what all commands do here:

~]: gvfs-mount smb://***/***/                      
Error mounting location: Location is already mounted
~]: mount | grep gvfs                                        
~]: ls /run/user/$UID/gvfs/
~]: killall gvfsd
~]: ps axf | grep gvfs
23635 pts/0    S+     0:00  |   |   \_ grep --color=auto gvfs
 6270 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-metadata
 6274 ?        Sl     0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 6279 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
 6285 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 6290 ?        Sl     0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
 6295 ?        Sl     0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
 6313 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.37 /org/gtk/gvfs/exec_spaw/0
 6366 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-network --spawner :1.37 /org/gtk/gvfs/exec_spaw/3
 6447 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.37 /org/gtk/gvfs/exec_spaw/9
 6731 ?        Sl     0:04 /usr/lib/gvfs/gvfsd-smb --spawner :1.37 /org/gtk/gvfs/exec_spaw/10
~]: ls /run/user/$UID/gvfs/

As I wrote, you need to run gvfs-mount again after killing gvfsd to make it restart and remount /run/user/$UID/gvfs/ . (though there probably would be a different way to start it too)
You didn’t, so /run/user/$UID/gvfs/ is still empty, that was the case here too.

The process list looks normal and indicates things are working like the should, given that you killed gvfsd before that.

~]: sudo coredumpctl 
root's password:
TIME                            PID   UID   GID SIG PRESENT EXE
... <truncated long list>
Tue 2017-06-20 11:20:41 EEST   3152  1000   100   6   /usr/bin/ksplashqml
Tue 2017-06-27 14:21:52 EEST   3044  1000   100   6   /usr/bin/ksplashqml
Fri 2017-06-30 10:55:22 EEST  10469  1000   100  11   /usr/bin/gwenview
Thu 2017-07-06 00:57:20 EEST   3020  1000   100   6 * /usr/bin/ksplashqml
Thu 2017-07-06 13:26:51 EEST  12253     0     0  11 * /usr/sbin/lightdm

Not good that those things crash, but unrelated.
As you truncated the list, I cannot tell what else there was, but as the first entry here is from June 20th, let’s just assume that gvfsd didn’t crash.

PS: you can start gvfsd by running this as user:

/usr/lib/gvfs/gvfsd

So try this instead, and see whether your share shows up in that directory then.

Although, it should be started automatically if any application (like gvfs-mount) tries to access the org.gtk.vfs.Daemon DBUS service.

Actually all the commands I pasted were run after the first kill of gvfsd. Here it is again, a new run:

~]: killall gvfsd
~]: killall gvfsd
gvfsd: no process found
~]: gvfs-mount smb://***/***/
Error mounting location: Location is already mounted
~]: ls /run/user/$UID/gvfs/
~]: ps axf | grep gvfs
27286 pts/0    S+     0:00      |   \_ grep --color=auto gvfs
 6270 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-metadata
 6274 ?        Sl     0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 6279 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
 6285 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 6290 ?        Sl     0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
 6295 ?        Sl     0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
 6313 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.37 /org/gtk/gvfs/exec_spaw/0
 6366 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-network --spawner :1.37 /org/gtk/gvfs/exec_spaw/3
 6447 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.37 /org/gtk/gvfs/exec_spaw/9
 6731 ?        Sl     0:04 /usr/lib/gvfs/gvfsd-smb --spawner :1.37 /org/gtk/gvfs/exec_spaw/10
27271 ?        Sl     0:00 /usr/lib/gvfs/gvfsd
~]: mount | grep gvfs
~]:

Not good that those things crash, but unrelated.
As you truncated the list, I cannot tell what else there was, but as the first entry here is from June 20th, let’s just assume that gvfsd didn’t crash.

Yes. That’s why I truncated it because the older lines were unrelated.

It seems not necessary as you can see above - it starts automatically very quickly. Still - nothing in the mount point…


~]: /usr/lib/gvfs/gvfsd
Failed to acquire daemon name, perhaps the VFS daemon is already running?

I hope I am not torturing you too much :slight_smile: I just wonder if there is something wrong with my system.

Ok, so gvfsd is automatically started (successfully), and is running again now.
But for some reason it doesn’t mount /run/user/$UID/gvfs/, i.e. it doesn’t run gvfsd-fuse like it does here:

test@linux-lf90:~/Schreibtisch> ps axf|grep gvfs
15326 pts/1    S+     0:00  |       \_ grep --color=auto **gvfs**
15311 ?        Sl     0:00 /usr/lib/**gvfs**/**gvfs**d
15316 ?        Sl     0:00 /usr/lib/**gvfs**/**gvfs**d-fuse /run/user/1001/**gvfs** -f -o big_writes

It seems not necessary as you can see above - it starts automatically very quickly.

Yes, as I wrote it should not be necessary, it should be started automatically.
So at least that works…

~]: /usr/lib/gvfs/gvfsd
Failed to acquire daemon name, perhaps the VFS daemon is already running?

Yes, that’s because it is already running.
Kill it first and try to run it again. Maybe there’s some error message?

And/or try to run this: (again, as user)

/usr/lib/gvfs/gvfsd-fuse /run/user/$UID/gvfs -f -o big_writes

What happens?
Does /run/user/$UID/gvfs get populated now? (and “mount | grep gvfs” showing some output)
Do you get an error message?

~]: killall gvfsd && /usr/lib/gvfs/gvfsd
gvfsd: no process found
~]: ps axf | grep gvfs && mount | grep gvfs
28572 pts/0    S+     0:00      |   \_ grep --color=auto gvfs
 6270 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-metadata
 6274 ?        Sl     0:01 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 6279 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
 6285 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 6290 ?        Sl     0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
 6295 ?        Sl     0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
 6313 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.37 /org/gtk/gvfs/exec_spaw/0
 6366 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-network --spawner :1.37 /org/gtk/gvfs/exec_spaw/3
 6447 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.37 /org/gtk/gvfs/exec_spaw/9
 6731 ?        Sl     0:04 /usr/lib/gvfs/gvfsd-smb --spawner :1.37 /org/gtk/gvfs/exec_spaw/10
~]: 
~]: /usr/lib/gvfs/gvfsd-fuse /run/user/$UID/gvfs -f -o big_writes
fuse: failed to exec fusermount: Permission denied
~]: 

So this is the reason for your “problem”:

fuse doesn’t work because fusermount cannot be run by the user because of wrong/insufficient permissions.
Please post the output of the following commands:

ls -l /usr/bin/fusermount
grep PERMISSION /etc/sysconfig/security
~]: ls -l /usr/bin/fusermount
-rwsr-x--- 1 root trusted 31560 Oct  7  2016 /usr/bin/fusermount
~]: grep PERMISSION /etc/sysconfig/security
PERMISSION_SECURITY="secure local"
PERMISSION_FSCAPS=""
# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or

Only users of the group “trusted” are allowed to execute it.

Here’s how it looks on my system:

test@linux-lf90:~> ls -l /usr/bin/fusermount
-rwsr-xr-x 1 root trusted 31560  7. Okt 2016  /usr/bin/fusermount

Here, every user is allowed to execute it.


PERMISSION_SECURITY="secure local"

And now guess why it works for me…:wink:

Changing the security level to “easy local” should fix it (run “chkstat” afterwards to set the permissions), or you could add your user to the group “trusted”.
Or you could override the permissions of fusermount in /etc/permissions.local , you might still run into other problems though.

Aha! I guess this is because I have tightened up security in yast settings.

Changing the security level to “easy local” should fix it (run “chkstat” afterwards to set the permissions),

But if that would affect the security level of other things, I would rather not touch it.

or you could add your user to the group “trusted”.

Won’t that have other implications too? I mean - that group trusted perhaps serves other purpose too, not only for this file, so that might unlock a door for a regular user to do some undesired things?

Or you could override the permissions of fusermount in /etc/permissions.local ,

Ok, I tried adding to that file:

/usr/bin/fusermount root:trusted 4755

that but the result is still the same (even after reboot).

you might still run into other problems though.

Like what?

BTW another interesting thing: although the mount point shows empty, I can do the following:

gvfs-copy smb://***/***<tab>

and it shows me the files in the remote directory. Of course I cannot use this in a script but it is still an interesting thing which I found.

After running ‘chkstat --system --set’ and reboot I could see the content in the mount point. Great! So thanks again.

Correct.

But if that would affect the security level of other things, I would rather not touch it.

Yes, it would.

But there’s a reason why “easy” is the default, you’ll likely run into such issues again and again.
The purpose of the “secure” settings (and “paranoid” even more so) is to restrict users, not to provide a convenient desktop experience.

Won’t that have other implications too? I mean - that group trusted perhaps serves other purpose too, not only for this file, so that might unlock a door for a regular user to do some undesired things?

Adding the user to the group “trusted” will only affect that particular user.
This particular user will be trusted, and allowed to do certain things that would be forbidden otherwise

Other (regular) users will not have any more powers than now.

Ok, I tried adding to that file:

/usr/bin/fusermount root:trusted 4755

that but the result is still the same (even after reboot).

Like what?

As you found out yourself meanwhile (and I told you), you need to run chkstat to apply that change.

OTOH, this change will affect all regular users.
I.e. all regular users are now able to run fusermount.

BTW another interesting thing: although the mount point shows empty, I can do the following:

gvfs-copy smb://***/***<tab>

and it shows me the files in the remote directory. Of course I cannot use this in a script but it is still an interesting thing which I found.

Why not use gvfs-ls instead to list the files? :wink:

There are quite a few more tools coming with gvfs:

test@linux-lf90:~> rpm -ql gvfs | grep bin
/usr/bin/gvfs-cat
/usr/bin/gvfs-copy
/usr/bin/gvfs-info
/usr/bin/gvfs-less
/usr/bin/gvfs-ls
/usr/bin/gvfs-mime
/usr/bin/gvfs-mkdir
/usr/bin/gvfs-monitor-dir
/usr/bin/gvfs-monitor-file
/usr/bin/gvfs-mount
/usr/bin/gvfs-move
/usr/bin/gvfs-open
/usr/bin/gvfs-rename
/usr/bin/gvfs-rm
/usr/bin/gvfs-save
/usr/bin/gvfs-set-attribute
/usr/bin/gvfs-trash
/usr/bin/gvfs-tree

Have a look at the man pages for further infos.

And I’d like to note again: /run/user/$UID/gvfs/ (and the virtual folders in it) only seems to exist for compatibility with “normal” applications that don’t support gvfs directly.
It obviously is not needed at all for gvfs itself to work.

Thanks wolfi!

You are of great help as always :slight_smile: