Live data from Hacker News

Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

github.com

211–220 of 280 posts

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#211
post #3

Here's the offending shell script code: # figure out the absolute path to the script being run a bit # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the # specified directory, then uses $PWD to figure out where that # directory lives - and all this in a subshell, so we don't affect # $PWD STEAMROOT="$(cd "${0%/*}" && echo $PWD)" [...] # Scary! rm -rf "$STEAMROOT/"* The programmer knew the danger and di…

Offending commit @ https://github.com/lrusak/steam_latest/commit/21cc14158c171f...

Actually, that repo is just a user who extracted the Steam .debs into a github repo, the comments are completely misdirected.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#212

The sad sad part of all this is that Half-life 1 had a similar bug in their windows installer and would wipe your program files if not careful http://arstechnica.com/civis/viewtopic.php?t=479484

One update to Eve Online had a broken script that removed "boot.ini" in some circumstances. Customers were not amused.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#213

Earlier quoted context omitted.

So I guess it's a choice between getting fired for not meeting a deadline, and getting fired for destroying customer data. I'd rather take the first option. At least my reputation will still be somewhat intact. And as a bonus, I can get out of that hostile environment earlier.

> I'd rather take the first option. At least my reputation will still be somewhat intact. I'd take the same option, but for different reasons: the customer's data. Only pictures of e.g. a deceased wife, no backup, and you just deleted them. You can arm-wave all you like about backing up, but you deleted them.

Dude, I am already stressed when hitting big red buttons in production, and from now on I can imagine the possibility of erasing unrecoverable memories about lost loved ones... This profession is tough on the most unexpected levels.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#214
post #126
post #120

Earlier quoted context omitted.

"most systems"? Not on Debian or Ubuntu, and that's most of them.

fwiw, making those "-i" aliases to rm, mv and cp are one of the first things I do on any new Linux machine I'm on. I don't understand how anyone works in the very unforgiving-of-accidental-delete *nix world without those aliases.

Frequent snapshots and backups (non-local)

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#216
post #207

Earlier quoted context omitted.

SourceTree and Transmit need to stomp all over directories to get things done. Yes, it's useful. But it's not common for applications to need that kind of access. The sandbox seems to work fine for the other 99% of applications. I think Apple even uses the sandbox heavily for their own apps, check ~/Library/Containers next time you use an OS X system. The only complaint here is about the app store, sandboxing is wond…

Steam is another category of application which wants to write to directories used by other applications...

Why? In my Windows VM, all Steam data lives in C:\Program Files\Steam. (Plus start menu entries etc.)

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#217
Another beautiful example of developer/user priority inversion.

All system architects ever:

1) System data are sacred, we must build a secure system of privileges disallowing anyone to touch them

2) User data are completely disposable, any user's program can delete anything.

All users ever:

1) What? I can reinstall that thing in 20 minutes, there's like 100 million copies worldwide of these files.

2) These are my unique and precious files worth years of work, no one can touch them without my permission!

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#218

Earlier quoted context omitted.

There are, it's called users, and groups, and file permissions. Applications like steam should really be running under a separate user so they can't write to personal files (and maybe just have read permissions). But of course proper application isolation and file permissions is something few people do correctly on their personal machines, let alone know about. Window managers don't make it any easier, and I put a lo…

Steam shouldn't run as its own user. It's a user-level process, not a system process. It needs to have user-specific things (install directory, save games, etc.) that need to be accessible to the person using it. Separating processes into users is only one method of sandboxing, and not appropriate in this case. Sandboxing via mechanisms like SELinux is the correct solution. One of the users in the Github thread even…

SELinux seems like a case of hunting tweetie birds with 88s...

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#219
post #209

Earlier quoted context omitted.

It is trivial to find systems where you can assign specific people to review code, of course. Plenty exist. But to guarantee that they truly read a line of code, rather than skimmed/scrolled through it? Even if they paused their scrolling on that line, it doesn't mean that they really read it, or did so with proper understanding of what it was doing. Short of placing an actual comment or question for that line (demon…

I think there's merit in the idea -- not tracking what a code reviewer reads but more of tracking how many times each line of code has been _included_ in a review, by being modified or maybe within so many lines of a change (like how diffs show X lines of surrounding context). The idea would be that code changes _near_ a buggy line would be more likely to draw attention to that bug and perhaps lines with less attenti…

I suspect it would work out the other way round - code in a frequently modified section would be more likely to hold bugs because the requirements/understanding of that code is changing more frequently.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#220
post #132

Earlier quoted context omitted.

Steam doesn't deal with its own files. It deals mainly with random games that are creating tons of random files.

Doesn't it have an API? It could mandate that "random files" should only be created and deleted via the API, and update the manifest accordingly. Put the game in a read-only folder to make sure it happens.

Steam actually sells a number of games which haven't been modified for use with Steam at all - no DRM integration, no achievements. Further to that, it sells games which use closed engines that are never going to be modified to use Steam's APIs to do things.
Post reply on HN