Scary Steam for Linux bug erases all the personal files on your PC
If you’re a Steam fan running Linux, the last thing you’ll want to do in the next few days is mess with your Steam files. Users on Valve’s GitHub Steam for Linux page are complaining about a nasty bug that has the potential to wipe out every single personal file on your PC. Even worse, users say the bug will even wipe out documents on USB connected drives. So much for local backups.
The impact on you at home: The obvious implication if you’re running Steam on Linux is to be wary of the program right now. As a precaution, don’t connect any local external hard drives while you’re running Steam. Users complaining of this bug appear to have moved their
~/.local/share/steam directories, or invoked Steam’s Bash script with the
—reset option enabled.
UPDATE: Valve gave us the following statement: "So far we have had a handful of users report this issue, after they manually moved their Steam install. We have not been able to reproduce the reported issue, but we are adding some additional checks to ensure this is not possible while we continue to investigate. If anyone else has experienced this or has more information, they should email firstname.lastname@example.org."
Steam’s bug appears to be caused by a line in the Steam.sh Bash script:
rm -rf “$STEAMROOT/“*. That command is a basic Bash instruction that tells the computer to remove the STEAMROOT directory and all its sub-directories (folders).
That’s all well and good, but the issue is that if the STEAMROOT folder is not there then the computer interprets the command as
rm -rf “/“*, as first reported by Bit-Tech. If you’re not familiar with Bash, that command tells the system to delete everything on your hard drive starting from the root directory.
The saving grace for Linux users is that you can only erase files you have write permissions over. That means the system itself can’t be erased, but pretty much all of a user’s files—including photos and personal documents—would be at risk.
Ironically, the instruction at issue is preceded by a comment from the developer:
Editor's note: This article originally published on 1/16/15, but was updated on 1/17/15 to include Valve's statement.