Bug 492793

Summary: Ability to unmount a specific URL
Product: [Frameworks and Libraries] kiofuse Reporter: Yevhen Popok <xalt7x.service>
Component: generalAssignee: a.saoutkin
Status: REPORTED ---    
Severity: wishlist CC: fabian, kio-bugs-null
Priority: VLO    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://invent.kde.org/system/kio-fuse/-/blob/6e3b8a92b81bbe598385d560cfacb5d7cbd5fb0f/README.md#running-kio-fuse-manually
See Also: https://bugs.kde.org/show_bug.cgi?id=483055
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Yevhen Popok 2024-09-08 10:33:47 UTC
SUMMARY
As mentioned in the KIO-fuse readme, it's possible to unmount kio-fuse mounts with the standard fusermount3 -u $dir command. The problem is that KIO-Fuse uses shared mount point (e.g., /run/user/1000/kio-fuse-AynHjG/) so I can't unmount some specific URL.

STEPS TO REPRODUCE
1. In Dolphin open several network URLs (e.g. sftp://user1@server1 and sftp://user2@server2)
2. That will create few directories in your local filesystem (e.g. "/run/user/1000/kio-fuse-AynHjG/sftp/user1@server1" and "/run/user/1000/kio-fuse-AynHjG/sftp/user1@server1")
3. Now you need to unmount sftp://user1@server1 only and keep sftp://user2@server2 opened

OBSERVED RESULT
User needs to close all relevant files/directories, unmount both URLs with fusermount -u  /run/user/1000/kio-fuse-AynHjG/, then mount again sftp://user2@server2

EXPECTED RESULT
User can unmount specifically sftp://user1@server1 while keeping files/directories on sftp://user2@server2 open.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora 40
KDE Plasma Version:  6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Comment 1 Fabian Vogt 2024-09-08 20:41:03 UTC
Why would you unmount a specific URL? KIO itself does not have a concept of mounts, so it wouldn't do anything.
Comment 2 Yevhen Popok 2024-09-08 21:04:41 UTC
(In reply to Fabian Vogt from comment #1)
> Why would you unmount a specific URL? KIO itself does not have a concept of
> mounts, so it wouldn't do anything.

User may want to "disconnect" from remote for multiple reasons.
Some examples:
- security/foolproof considerations (make sure that nothing on remote will be added or deleted using connection from the particular machine)
- not to disturb remote users (e.g., during shutdown, GNOME reports when there are other logged in users)
Comment 3 Fabian Vogt 2024-09-08 22:10:16 UTC
(In reply to Yevhen Popok from comment #2)
> (In reply to Fabian Vogt from comment #1)
> > Why would you unmount a specific URL? KIO itself does not have a concept of
> > mounts, so it wouldn't do anything.
> 
> User may want to "disconnect" from remote for multiple reasons.
> Some examples:
> - security/foolproof considerations (make sure that nothing on remote will
> be added or deleted using connection from the particular machine)

I don't think security applies here, but "foolproof considerations" might, for the case that something important is mounted (e.g. remote home dir) that should not fall victim of a rm -rf /*. Arguably that's futile to mitigate though, it'll always deal maximum damage.

> - not to disturb remote users (e.g., during shutdown, GNOME reports when
> there are other logged in users)

There is no active connection open per mount, only for actions.