Bug 444652

Summary: Dolphin allows the user to move to the trash files that cannot actually be removed by him
Product: [Applications] dolphin Reporter: Luca Carlon <carlon.luca>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR    
Version: 21.08.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luca Carlon 2021-10-30 09:07:01 UTC
SUMMARY
In some cases dolphin allows to move to the trash bin directories that cannot be actually removed by the current user.

STEPS TO REPRODUCE
1. Create a directory owned by the current user: mkdir somedir
2. Create a directory owned by root inside somedir: sudo mkdir rootdir
3. Create a file owned by root inside rootdir: sudo touch file
4. Move to the trash bin the entire directory "somedir".

OBSERVED RESULT
Dolphin allows the user to remove the directory, and places it in the trash bin. Once the user tries to empty the trash bin, an error is returned. This may be pretty bothering cause a user won't be able to empty the trash until he finds what must be moved out of the bin.

EXPECTED RESULT
IMO the user should not be allowed to send "somedir" to the trash bin, although "moving" is technically possible. Sending to the trash bin should be possible only when "removing" is actually allowed.
The result is that a user won't be able to empty the trash bin anymore without fixing the problem manually, by restoring what is blocking the procedure. This does not seem very user-friendly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.10-1
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2