PDA

View Full Version : Tech alert for anyone running Steam on Linux: it can remove -all- your user files



ThePythonicCow
17th January 2015, 00:27
Thanks to this Slashdot article: Steam For Linux Bug Wipes Out All of a User's Files (http://linux-beta.slashdot.org/story/15/01/16/1429201/steam-for-linux-bug-wipes-out-all-of-a-users-files), I have learned of a Neowin article: Moving the Steam folder on Linux is causing users' entire file systems to be deleted (http://www.neowin.net/news/moving-the-steam-folder-on-linux-is-causing-users-entire-file-systems-to-be-deleted).

I have just verified that the Steam I have installed, to run Sid Meier's Civilization Beyond Earth, has this bug. The file $HOME/.local/share/Steam/steam.sh on my computer has the lines:
# Scary!
rm -rf "$STEAMROOT/"*
in a routine that runs if Steam needs to reset its configuration.

As they used to say in the computer tech pubs business - Steam: See Fig. 1 (http://www.clipartbest.com/cliparts/RTA/648/RTA648Mgc.jpeg).

A Voice from the Mountains
17th January 2015, 02:49
I don't understand this. Steam moving to Linux was supposed to be a big blow to Windows. But then Steam puts this potentially frustrating line into its configuration files? They can't believe this will actually make people want to switch back to windows, lol.... This makes no sense to me.

guayabal
17th January 2015, 03:44
Thanks Paul, I haven't used Steam yet. Does this thing run as root?

ThePythonicCow
17th January 2015, 05:26
Thanks Paul, I haven't used Steam yet. Does this thing run as root?
No - it does not run as root (unless that's how you were logged in when you run it -- NOT recommended.)

It runs under whatever user id you are running when you invoke it - would typically would be your user login account.

ThePythonicCow
17th January 2015, 05:35
Here's the thread on github (Steam is open source using Git) where this bug, and its fix, are being discussed: https://github.com/ValveSoftware/steam-for-linux/issues/3671

DeDukshyn
17th January 2015, 05:37
I want to tell Valve to get off their lazy asses, take a break from Steam, and make Half Life 3 Dammit!!!

A Voice from the Mountains
17th January 2015, 07:55
I feel like I should take this time to point out (maybe against Steam's secret wishes? or maybe they were just paid off by Microsoft....) that Linux Mint is user-friendly, looks just like your familiar Windows OS, can run most any Windows software, and is totally free and open-source. Linux can often run Windows software faster than Windows itself can.

Did I mention that China is switching to a version of Linux for their government computers, to help prevent the NSA hacking their computers?

Since everything is open-source, you can find troublesome coding like the line shown in the OP. It's right out in the open for everyone to see, unlike Windows which likes to hides coding and parasitic processes behind proprietary privileges.

meeradas
17th January 2015, 09:06
... to run Sid Meier's Civilization Beyond Earth, ...

You
have time to play?

Wondrous!

Frank V
17th January 2015, 13:20
Thanks to this Slashdot article: Steam For Linux Bug Wipes Out All of a User's Files (http://linux-beta.slashdot.org/story/15/01/16/1429201/steam-for-linux-bug-wipes-out-all-of-a-users-files), I have learned of a Neowin article: Moving the Steam folder on Linux is causing users' entire file systems to be deleted (http://www.neowin.net/news/moving-the-steam-folder-on-linux-is-causing-users-entire-file-systems-to-be-deleted).

Yes, it even made some local (computer-oriented) news over here in the Dutch-speaking world yesterday. Now, I personally don't run Steam -- even if only because this archaic distribution here has a bug that doesn't allow access to the 3D hardware acceleration in the video adapter -- but that is one hell of a stupid and amateuristic bug!



I have just verified that the Steam I have installed, to run Sid Meier's Civilization Beyond Earth, has this bug. The file $HOME/.local/share/Steam/steam.sh on my computer has the lines:
# Scary!
rm -rf "$STEAMROOT/"*
in a routine that runs if Steam needs to reset its configuration.

One should never run a delete command -- and especially not a recursive one -- on any directory without checking for its existence. I can't believe that they've been that stupid -- but they were, weren't they?

The good news is that the bug is easily fixed, because it's only a shell script and it can be edited with a normal text editor...


if [ -z ${STEAMROOT} ]
then
rm -rf ${STEAMROOT}
fi

Or shorter...


[ -z ${STEAMROOT} ] && rm -rf ${STEAMROOT}



As they used to say in the computer tech pubs business - Steam: See Fig. 1 (http://www.clipartbest.com/cliparts/RTA/648/RTA648Mgc.jpeg).

Isn't that also what Linus Torvalds told nVidia somewhere in the course of 2014? :p

iYWzMvlj2RQ

(Hopefully this won't get censored because of the F-word in the video title. :p)

LivioRazlo
17th January 2015, 22:43
I want to tell Valve to get off their lazy asses, take a break from Steam, and make Half Life 3 Dammit!!!

Half-Life 3: :hail::pray::pray::pray::hail: