Always fun to see people with limited understanding of ACLs struggle with filesystems that apply them.
Windows has a lot of features built in to prevent users (and malware) from breaking their system, such as the “system” and “read only” flags. I suppose explorer could’ve asked you to elevate, unset any flags, alter ownership, and delete anyway, but that’s doing a lot of work you don’t necessarily intend to do when you click “delete”.
Linux has this too; try the following:
mkdir -p /tmp/test/deleteme; touch /tmp/test/deleteme/deleteme.txt; chattr +i /tmp/test/deleteme /tmp/test/deleteme/deleteme.txt # If you want to apply the "drive from different system" equivalence sudo chown -R 12345:12345 /tmp/test/deleteme
Now try deleting the folder /tmp/test/deleteme from your file explorer:
Frustrated, you may try to force the issue by forcefully removing the file through the terminal:
user@box /tmp/test $ sudo rm -rf deleteme Place your finger on the fingerprint reader rm: cannot remove 'deleteme/deleteme.txt': Operation not permitted user@box /tmp/test $
Alright, what if I…
user@box /tmp/test $ sudo -i Place your finger on the fingerprint reader root@box ~ $ cd /tmp/test root@box /tmp/test $ rm -rf deleteme rm: cannot remove 'deleteme/deleteme.txt': Operation not permitted root@box /tmp/test $ whoami root
The only way to get rid of these files, is to set the right flags:
user@box /tmp/test $ chattr -i deleteme deleteme/deleteme.txt user@box /tmp/test $ rm -rf deleteme
DarienGS@lemmy.world 1 year ago
What’s wrong with this? Every OS has permissions that stop users from breezily deleting system files.
stappern@lemmy.one 1 year ago
this is not the system folder, different drive, old windows install
lemmyvore@feddit.nl 1 year ago
If you try to access an old Linux install you could run into the exact same problem. Both Linux and Windows nowadays use filesystems with permissions embedded into them, so if the user on the new install doesn’t match the old one you’ll have a problem.
Carighan@lemmy.world 1 year ago
Well then change the owner and toss the old folders. Or just format it?
Aasikki@sopuli.xyz 1 year ago
Why wouldn’t you just format the drive if it had an old windows install?
vojel@feddit.de 1 year ago
laughs in Linux…
fushuan@lemm.ee 1 year ago
laughs because it has the same level of protection as other OSs and thus is quite secure in that regard, right?
LoafyLemon@kbin.social 1 year ago
This seems to be an external drive, not the boot drive.