RedditEnjoyer@lemmy.world to Linux@lemmy.ml · 7 months agoA Linux user's nightmare: the machine was wiped clean with one clickwww.mikrobitti.fiexternal-linkmessage-square50fedilinkarrow-up1120arrow-down115file-text
arrow-up1105arrow-down1external-linkA Linux user's nightmare: the machine was wiped clean with one clickwww.mikrobitti.fiRedditEnjoyer@lemmy.world to Linux@lemmy.ml · 7 months agomessage-square50fedilinkfile-text
minus-squarecarzian@lemmy.mllinkfedilinkarrow-up44·edit-27 months agoThe command was rm -rf $pathvariable Bug in the code caused the path to be root. Wasn’t explicitly malicious
minus-squareDandroid@sh.itjust.workslinkfedilinkarrow-up19·7 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.
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up15arrow-down1·7 months agoit apparently was defaulting to the home dir, not /
minus-squareDandroid@sh.itjust.workslinkfedilinkarrow-up1·7 months agoOh, oof. Hopefully most people take regular snapshots.
minus-squareTFO Winder@lemmy.mllinkfedilinkarrow-up9·7 months agoYes, rm -rf --allow-unsafe Or something is required
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