#1014038 linux-image-5.10.0-15-amd64: write protected files deleted

#1014038#5
Date:
2022-06-29 01:38:47 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
Within Dolphin, a folder was highlighted. This folder was a development folder congaing read-only backup files.
I clicked on a file that was obsolete, and instrcuted Dolphin to <delete>. I did not notice that clicking on the obsolete file did not un-highlight the development folder.


   * What was the outcome of this action?
Both the obsolete file and the development file were deleted entirely.
   * What outcome did you expect instead?
A notice of failure because of attempt to delete a read-only file

#1014038#10
Date:
2022-06-29 11:38:35 UTC
From:
To:
https://lists.debian.org/debian-kde/2021/08/msg00001.html is a discussion
about being able to write a read-only file and that was resolved upstream here:
https://bugs.kde.org/show_bug.cgi?id=440986

While not exactly the same, it does seem similar.
And while its behavior seems *technically* correct, I can understand it is
undesirable and unexpected.

#1014038#15
Date:
2022-06-29 18:56:44 UTC
From:
To:
This is how Unix has always worked, and it's not going to change now.

To protect files against deletion, either:
- remove write permission for the directory, or
- use chattr(1) to set the 'i' (immutable) attribute on the files

Also consider enabling the trash bin (or whatever it's called) in
Dolphin.

Ben.