Bug 434334

Summary: Folder disappear after using as mountpoint with `borg mount`
Product: [Applications] dolphin Reporter: scl
Component: panels: foldersAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR Flags: scl: corner_case+
Version: 20.12.2   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshots of the steps to reproduce

Description scl 2021-03-12 18:34:51 UTC
Created attachment 136627 [details]
Screenshots of the steps to reproduce

SUMMARY
Borg (https://www.borgbackup.org/) is a CLI backup tool with the ability to mount so called archives as FUSE filesystem. (refer to https://borgbackup.readthedocs.io/en/stable/usage/mount.html)
When mounting archives with `borg mount` the mountpoint folder disappears in the graphical interface of dolphin if the user of the dolphin process has lower rights as the owner of the mountpoint (e.g. mointpoint owner root while running dolphin as regular user).


STEPS TO REPRODUCE
1. Open the GUI of dolphin at the directory containing the mountpoint as regular user --> mounpoint folder visible
2. Mount borg archive running `borg mount path/to/repo::archive mountpoint` from the bash as root
   - borg will set the owner and group of the mountpoint to the executing user/group (in this case: root)
   - The success of these actions has been verified with `ls`
3. Switch back to the graphical panel of dolphin and press F5 to refresh --> mountpoint folder disappears
4. Unmount with `umount mountpoint` from the bash as root
5. Switch back to the graphical panel of dolphin and press F5 to refresh --> mountpoint folder appears

These steps have been reproducibly tested with the following two different systems and with the borg repo located on the local and external disk.
- System1: Manjaro, KDE, dolphin
- System2: Manjaro, Gnome, dolphin,nautilus,thunar

Screenshots of the steps to reproduce from System2 are attached.


OBSERVED RESULT

                                   | dolphin   | nautilus | thunar
-----------------------------------|-----------|----------|---------
folder visibility                  |           |          |
                                   |           |          |
 - when unused                     |           |          |
   - and mountpoint_owner == user  | visible   | visible  | visible
   - and proc_user == regular_user | visible   | visible  | visible
     and mountpoint_owner == root  |           |          |
                                   |           |          |
 - when used as mountpoint         |           |          |
   - and mountpoint_owner == user  | visible   | visible  | visible
   - and proc_user == regular_user | INVISIBLE | visible  | visible
     and mountpoint_owner == root  |           |          |

1. The problem is dolphin related, because other filemanagers don't have this behavior on different desktop environments and with different borg repository locations
2. The problem appears only when a folder is used as borg mountpoint AND the user of the dolphin process has lower rights as the mounpoint owner


EXPECTED RESULT
Dolpin shows folders regardless of its ownership or usage as mountpoint.


SOFTWARE/OS VERSIONS
The tested systems have been fully updated right before (date: 2021-03-12).
- plasma-desktop 5.21.2-1
- gnome-shell 1:3.38.3-1
- borg 1.1.14-3
- python-llfuse 1.3.8-2
- dolphin 20.12.2-1
- thunar 4.16.3-1
- nautilus 3.38.2-1