Nemo can erase a folder containing an immutable file
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- desktop, operating-systems
Research direction
Start by reproducing the issue on a Linux filesystem with an immutable file, following the listed terminal and Nemo steps. Trace Nemo's move-to-trash and empty-trash paths, then verify that an immutable file remains protected and that the relevant operation is denied, matching terminal behavior.
Written by the indexing model from the issue text.
Description
Distribution
Mint 21.3
Package version
6.0.2
Frequency
Always
Bug description
From Nemo, the folder containing an immutable file can be sent to the trash bin and, then, the trash bin can be emptied!
From the terminal you cannot remove the folder, even as root.
Here I make the file immutable and try to remove its containing folder which is denied as is expected:
~/folder$ mkdir test-folder
~/folder$ cd test-folder
~/folder/test-folder$ touch file
~/folder/test-folder$ ls
file
~/folder/test-folder$ sudo chattr +i file
[sudo] Mot de passe de philippe :
~/folder/test-folder$ lsattr
----i---------e------- ./file
~/folder/test-folder$ cd ..
~/folder$ rm -r test-folder
rm: impossible de supprimer 'test-folder/file': Opération non permise
rm: impossible de supprimer 'test-folder': Le dossier n'est pas vide
~/folder$ sudo rm -r test-folder
rm: impossible de supprimer 'test-folder/file': Opération non permise
Immediately after all this I went to Nemo, tried to completely erase test-folder and it was denied BUT THEN tried to move it to the trash bin and it worked!
I went to the trash bin and clicked on "Empty the trash bin" and it worked and the immutable file had been definitely erased.
Actually one can find the file erased in ~/.local/share/trash/expunged/nnnnnnnnnnn/
nnn… being a number of digits.
Either the transfer to the trash bin of a folder containing an immutable file or the emptying of the bin should be denied as is the case when one try to erase the folder from the terminal.
Steps to reproduce
- Create a folder and in it a file.
- Set the immutable attribute to the file (sudo chattr +i file).
- In Nemo send the folder containing the immutable file to the trash bin.
- Empty the trash bin.
- The so-called « immutable » file has been deleted!
Expected behavior
Either the transfer to the trash bin of a folder containing an immutable file or the emptying of the bin should be denied as is the case when one try to erase the folder from the terminal.
Additional information
I can reproduce the abnormal behaviour of Nemo (not respecting the extended attributes of the filesystem, ext4 here) in Debian 12 Cinnamon.
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 368
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linuxmint/nemo
-
Desktop rename box: white text on a hardcoded white gradient with any dark theme (also black caret) Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100