@RedditEnjoyer to [email protected] • 8 months agoA Linux user's nightmare: the machine was wiped clean with one clickwww.mikrobitti.fiexternal-linkmessage-square49arrow-up1119arrow-down113file-textcross-posted to: technology
arrow-up1106arrow-down1external-linkA Linux user's nightmare: the machine was wiped clean with one clickwww.mikrobitti.fi@RedditEnjoyer to [email protected] • 8 months agomessage-square49file-textcross-posted to: technology
minus-square@[email protected]linkfedilink43•edit-28 months agoThe command was rm -rf $pathvariable Bug in the code caused the path to be root. Wasn’t explicitly malicious
minus-squareDandroidlinkfedilink19•8 months agoDon’t most distros have safeguards against this? I tried sudo rm -rf / in an Ubuntu VM that I was about to delete just to see what happened, and it gave me a warning. I had to add some other option to bypass the warning.
The command was rm -rf $pathvariable
Bug in the code caused the path to be root. Wasn’t explicitly malicious
Don’t most distros have safeguards against this? I tried
sudo rm -rf /
in an Ubuntu VM that I was about to delete just to see what happened, and it gave me a warning. I had to add some other option to bypass the warning.it apparently was defaulting to the home dir, not
/
Oh, oof.
Hopefully most people take regular snapshots.
Yes,
rm -rf --allow-unsafe
Or something is required
--no-preserve-root