Bug 459545

Summary: Cannot delete from trash clicking "Delete" button: Changing the attributes of files is not supported with protocol trash
Product: [Applications] dolphin Reporter: Petrov Egor <dikey0ficial>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: benedikt.keppner, bizyaev, dark.shadow4, demetrykravchenko, dikey0ficial, gautier.difolco+kde, kde, kfm-devel, nate, nejc, popov895, postix, smowtenshi, thwomp000
Priority: NOR    
Version: 22.08.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.104
Attachments: these appear when pressing delete key to delete a file in trash

Description Petrov Egor 2022-09-22 19:48:33 UTC
SUMMARY
***
When I try to delete files/folders from trash with selecting them and click "del" on keyboard, it shows error with text "Changing the attributes of files is not supported with protocol trash" (btw, in Russian localization it shows "trash://"). Clicking Shift+Del deletes. According to notification that appears with dialog window, Dolphin tries to move file/folder to trash... from trash.
***


STEPS TO REPRODUCE
1. Delete smth (move to trash)
2. Go to Trash folder
3. Select deleted file
4. Click "del"

OBSERVED RESULT

It shows error

EXPECTED RESULT

It deletes selected file/folder(s)

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220918
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
I think that it's five-minute bug :)
Comment 1 popov895 2022-09-23 09:07:23 UTC
Same on Fedora KDE Spin.

Also, when I try to delete a folder, I get error "Creating folders is not supported with protocol trash".
Comment 2 postix 2022-09-26 18:33:59 UTC
SUMMARY

I got an NTFS data drive mounted at "/media/data", where I had deleted a few things.
I tried to empty Dolphin's trash folder as follows

1. entering the "trash:" folder
2. selecting all files by "Ctrl + A"
3. Hitting "Delete" on the keyboard

Dolphin printed an error:  
```
Changing the attributes of files is not supported with protocol trash
```

and Journalctl logged
```
Sep 26 20:21:08 kioslave5[14425]: kf.kio.slaves.trash: Directory "/media/data/.Trash-1000" exists but didn't pass the security checks, can't use it
```

The last log line appears also (several times), when clicking on "Empty Trash" in the context menu of the Trash Folder instead. However, here the files are indeed deleted.

It'd be great if the first way also worked as expected.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220923
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5
Kernel Version: 5.19.10-1-default (64-bit)
Comment 3 benedikt.keppner 2022-10-06 09:07:41 UTC
Same thing in Manjaro KDE! "Creating folders is not supported with protocol trash" feels like an unexpected behaviour when hitting del key in dolphin... Makes sense that shift del works since it usually skips trash then, but maybe call out an warning when deleting from trash with del...
Comment 4 Gautier 2022-10-06 20:21:58 UTC
Same thing on NixOS unstable with dolphin 22.08.1
On my local disk or on NFS.
Comment 5 Petrov Egor 2022-10-16 15:59:58 UTC
Updated to Plasma 5.26. Nothing changed, bug still reproduces
Comment 6 thwomp000 2022-11-08 23:17:44 UTC
Created attachment 153605 [details]
these appear when pressing delete key to delete a file in trash

I am experiencing this bug on Manjaro.
If I select a file in trash and press the delete key, a window will pop up saying "Changing the attributes of files is not supported with protocol trash" and a Dolphin notification will appear in the bottom right saying it's moving the file I am trying to delete to trash. Pressing retry repeats the error and canceling makes the file not get deleted.
If I select a folder in trash and press the delete key, a message on the top of the Dolphin window will say "Creating folders is not supported with protocol trash" and the folder won't be deleted.
If I right click the file/folder and click delete, then it will work as expected.

Someone said here they have a NTFS drive attached, I don't know if this is related to the bug, but I also do.

Dolphin Version: 22.08.2
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.15.76-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 7 Fabian Maurer 2022-12-14 13:04:59 UTC
FWIW, I don't have a NTFS drive mounted and the issue still occurs.
Comment 8 popov895 2023-01-06 22:44:37 UTC
Any work on this? Maybe it's a KIO issue?
Comment 9 kde 2023-02-08 15:03:25 UTC
I'm getting this as well, with regular files deleted (moved to trash) off of a local ext4 disk.
Comment 10 Bug Janitor Service 2023-02-15 15:50:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1200
Comment 11 Bug Janitor Service 2023-02-15 15:55:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1201
Comment 12 Méven Car 2023-02-25 10:07:47 UTC
Git commit 28cc6f98c292f5aee9b38d2f41c24ed8c2ee05f1 by Méven Car, on behalf of Méven Car.
Committed on 25/02/2023 at 10:07.
Pushed by meven into branch 'master'.

DeleteOrTrashJob: when trashing a file in trash:/ delete it instead

M  +32   -4    autotests/deleteortrashjobtest.cpp
M  +3    -0    autotests/mockcoredelegateextensions.h
M  +4    -0    src/widgets/deleteortrashjob.cpp

https://invent.kde.org/frameworks/kio/commit/28cc6f98c292f5aee9b38d2f41c24ed8c2ee05f1
Comment 13 Méven 2023-02-25 10:10:00 UTC
Git commit 24dbe2d3598498d7de372fe087a04824ac03191b by Méven Car.
Committed on 25/02/2023 at 10:09.
Pushed by meven into branch 'kf5'.

DeleteOrTrashJob: when trashing a file in trash:/ delete it instead

M  +32   -4    autotests/deleteortrashjobtest.cpp
M  +3    -0    autotests/mockcoredelegateextensions.h
M  +4    -0    src/widgets/deleteortrashjob.cpp

https://invent.kde.org/frameworks/kio/commit/24dbe2d3598498d7de372fe087a04824ac03191b
Comment 14 Méven 2023-02-25 10:10:12 UTC
Git commit 24dbe2d3598498d7de372fe087a04824ac03191b by Méven Car.
Committed on 25/02/2023 at 10:09.
Pushed by meven into branch 'kf5'.

DeleteOrTrashJob: when trashing a file in trash:/ delete it instead

M  +32   -4    autotests/deleteortrashjobtest.cpp
M  +3    -0    autotests/mockcoredelegateextensions.h
M  +4    -0    src/widgets/deleteortrashjob.cpp

https://invent.kde.org/frameworks/kio/commit/24dbe2d3598498d7de372fe087a04824ac03191b
Comment 15 smow 2023-03-14 19:11:22 UTC
I'm pretty confused, because I'm still experiencing the issue after KIO update to 5.104.

---
Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.6-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 16 Nate Graham 2023-03-15 15:32:28 UTC
Hmm, it's working for me. This means your issue is something subtly different; can you please submit a new bug report for it?