https://bugs.kde.org/show_bug.cgi?id=528894
Bug ID: 528894
Summary: Home trash is created with mode 755, which breaks
trashing from Flatpak apps
Classification: Frameworks and Libraries
Product: frameworks-kio
Version First 6.30.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Trash
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
When ~/.local/share/Trash does not exist, KIO creates it, and its files/ and
info/ subdirectories, with mode 755.
STEPS TO REPRODUCE
1. mv ~/.local/share/Trash ~/.local/share/Trash.bak
2. touch ~/trashtest && kioclient move ~/trashtest trash:/
3. stat -c '%a %n' ~/.local/share/Trash ~/.local/share/Trash/*
OBSERVED RESULT
755 ~/.local/share/Trash
755 ~/.local/share/Trash/files
755 ~/.local/share/Trash/info
EXPECTED RESULT
700 on all three. KIO already uses 700 for .Trash-$UID on other filesystems,
and GLib uses 700 for the home trash.
WHY IT MATTERS
xdg-desktop-portal 1.22.1 refuses to use a home trash that is not 700, so
Flatpak apps cannot trash anything. Bazaar and Warehouse fail with
"Trash portal failed on <path>" when removing leftover app data.
Portal issue: https://github.com/flatpak/xdg-desktop-portal/issues/2052
The portal has since relaxed this check upstream, but creating the home
trash with 0700 would match GLib and KIO's own .Trash-$UID handling.
WORKAROUND
chmod 700 ~/.local/share/Trash ~/.local/share/Trash/files
~/.local/share/Trash/info
SOFTWARE VERSIONS
Operating System: Manjaro Linux
KDE Plasma: 6.7.5
KDE Frameworks: 6.30.0
Qt: 6.11.2
kio 6.30.0-1
xdg-desktop-portal 1.22.1-2
Wayland session
--
You are receiving this mail because:
You are watching all bug changes.