It is not possible to unmount FUSE filesystems as a normal user. I'm not sure when this broke. It used to work correctly in the past. For example: $ sshfs my.server.hostname: $HOME/mnt That works. But unmounting: $ umount $HOME/mnt umount: /home/realnc/mnt: umount failed: Operation not permitted Trying with fusermount gives this: $ fusermount -u $HOME/mnt fusermount: entry for /home/realnc/mnt not found in /etc/mtab However, /etc/mtab does contain an appropriate entry: my.server.hostname: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0 The same thing also happens with NTFS-3G (which is also a FUSE filesystem): $ mount /windows/D $ umount /windows/D umount: /windows/D: umount failed: Operation not permitted This has repercussions on desktop environments as well. In KDE for example, when I plug in an NTFS USB disk, it gets mounted OK. But it's impossible to unmount it again from within KDE.
Created attachment 324318 [details] emerge --info
Forgot to mention the versions I tried: 2.8.7 2.9.0 2.9.1 2.9.1-r1 I think it's safe to say that it's not a change in fuse itself that introduced this bug, but rather a change in some other package, since it was definitely working OK with 2.9.0 at the time that it was the most recent version.
Created attachment 324324 [details] Output of "emerge --info" I am having a similar problem on my ~amd64 system.
Created attachment 324362 [details] emerge --info
Same here with several versions of sys-fs/fuse up to 2.9.1-r1 openssh-6.1_p1 sshfs-fuse 2.4 and sshfs-fuse GIT IHMO, the severity should be raised to 'major' since it breaks daily backup services here. Helmut.
Does putting something like this in /etc/fstab help? sshfs#my.server.hostname:$HOME /mnt fuse rw,user,noauto,fsname=sshfs#my.server.hostname:$HOME,reconnect 0 0
(In reply to comment #6) > Does putting something like this in /etc/fstab help? > sshfs#my.server.hostname:$HOME /mnt fuse > rw,user,noauto,fsname=sshfs#my.server.hostname:$HOME,reconnect 0 0 mount: /etc/fstab: parse error: ignore entry at line 8.
(In reply to comment #6) > Does putting something like this in /etc/fstab help? > sshfs#my.server.hostname:$HOME /mnt fuse > rw,user,noauto,fsname=sshfs#my.server.hostname:$HOME,reconnect 0 0 With an entry like sshfs#jarausch@WWW_SV:/srv/www/htdocs /usr/WWW fuse noauto,users,uid=230,gid=100,umask=0 0 0 # ,allow_other I just get the same error message, i.e. fusermount: entry for /usr/WWW not found in /etc/mtab cat /etc/mtab : jarausch@WWW_SV:/srv/www/htdocs /usr/WWW fuse.sshfs rw,nosuid,nodev,noexec 0 0 Helmut.
I have a machine at hand that had a folder mounted BEFORE it broke, is still running and is now broken for new mounts. The mtab-entry looks different in both cases: Old entry (i.e. fusermount -u works): machine:/some/older/folder /home/myname/mnt2 fuse.sshfs rw,nosuid,nodev,user=myname 0 0 New entry (i.e. it breaks): machine:/some/other/folder /home/myname/mnt fuse.sshfs rw,nosuid,nodev 0 0 Note the missing "user=myname" parameter which (I guess) is added by some part of fuse / sshfs? It appears fusermount is looking for it to detect mounts done by the user "myname"...
Adding ",user=..." to the entry mounted by sshfs directly to /etc/mtab makes `fusermount -u` work again.
(In reply to comment #7) > (In reply to comment #6) > > Does putting something like this in /etc/fstab help? > > sshfs#my.server.hostname:$HOME /mnt fuse > > rw,user,noauto,fsname=sshfs#my.server.hostname:$HOME,reconnect 0 0 > > mount: /etc/fstab: parse error: ignore entry at line 8. That was meant to be on a single line.
OK, a FUSE dev (Miklos Szeredi) finally tracked the problem down. The bug is in util-linux-2.22. Upstream was actually aware of it due to a similar bug report on Arch Linux. The fix is in upstream's Git already: http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commit;h=4be900c51d371a7a41495e4eca2d29fc77c20c7c I applied that on top of util-linux-2.22 and it fixed the issue. "umount" works now as normal user with NTFS-3G, and "fusermount -u" for sshfs. /etc/mtab now contains the "user=" option.
(In reply to comment #12) I confirm also that the abovementioned patch for util-linux-2.22 solves the problem and fusermount -u now works for my user mounted iso images which previously failed to unmount. Thank you.
Reassign bug to base-system team
(In reply to comment #10) > Adding ",user=..." to the entry mounted by sshfs directly to /etc/mtab makes > `fusermount -u` work again. That also fixed fusermount on my end (sys-fs/fuse-2.9.1-r1, sys-fs/sshfs-fuse-2.4, sys-apps/util-linux-2.22). After patching libmount/src/context_mount.c in sys-apps/util-linux-2.22 user sshfs unmounting works again.
should be all set now in the tree; thanks for the report! Commit message: Add fix from upstream for umount with user= options http://sources.gentoo.org/sys-apps/util-linux/files/util-linux-2.22-umount-user.patch?rev=1.1 http://sources.gentoo.org/sys-apps/util-linux/util-linux-2.22-r1.ebuild?rev=1.1
I just found another bug where "umount" with NTFS-3G doesn't work as non-root if /etc/mtab is a symlink to /proc/mounts. But I guess that's material for a different bug.
(In reply to comment #17) that is a known issue in the kernel that can't really be resolved by userland at this time