Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 653594

Summary: sys-fs/fuse should install /sbin/umount.fuse
Product: Gentoo Linux Reporter: yves.caniou
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: UNCONFIRMED ---    
Severity: normal CC: ppurka
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description yves.caniou 2018-04-20 10:18:33 UTC
Hi

This is related to https://bugs.gentoo.org/542800 (but sys-fs/sshfs-fuse has gone), and sys-fs/fuse-2.9.7 is installed on my system.

If information is given in /etc/fstab for a fuse.sshf fs, like:
 login@hostname_somewhere:  /mnt/mymount_point  fuse.sshfs  noauto,port=22,user,noatime,reconnect,_netdev   0       0
and if the user has write rights on /mnt/mymount_point, then she can mount /mnt/mymount_point with a simple "mount /mnt/mymount_point".
Indeed, strace shows that a call is done to /sbin/mount.fuse.sshfs, then if not existing, to /sbin/mount.fuse installed with sys-fs/fuse (Note that not rights elevation is done -- mount is setuid).

Yet, "unmount /mnt/mymount_point" does not work, and it's troublesome.
Strace shows that different binaries are searched and not found:
stat("/sbin/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/sbin/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/sbin/fs.d/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/sbin/fs.d/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/sbin/fs/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/sbin/fs/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/bin/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/bin/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/usr/bin/umount.fuse.sshfs", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)
stat("/usr/bin/umount.fuse", 0x7ffcb48a4300) = -1 ENOENT (No such file or directory)

2 things to umount:
- either the user does a "fusermount -u"
- root does umount /mnt/mymount_point

Is it possible that Gentoo installs a wrapper to umount/fuse by default?

Cheers.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-20 10:33:17 UTC
Apparently sys-fs/fuse-common installs that.
Comment 2 yves.caniou 2018-04-20 10:42:23 UTC
(In reply to Jeroen Roovers from comment #1)
> Apparently sys-fs/fuse-common installs that.

I'm a bit puzzled it you mean that in order to unmount, someone has to install another package, which at the moment is not even stable:
 
# eix sys-fs/fuse-common
* sys-fs/fuse-common
     Available versions:  ~3.2.1^t ~3.2.2^t
Comment 3 Tim Harder gentoo-dev 2018-09-15 08:21:49 UTC
It seems like the proper approach would be to add a uhelper arg to the mtab for fuse mounts as described in https://github.com/libfuse/libfuse/issues/246.