Hacker News new | past | comments | ask | show | jobs | submit login

The important character here is the '>'. This redirects output to a file and overwrites the file. The lrwxrwxrwx will only print an error, but the redirect to the target executable will erase the target.

For example:

  $ echo "asdf" > foo
  $ cat foo
  asdf
  $ lrwxwrwxrwx 1 root root -> foo
  lrwxrwxrwx: command not found
  $ cat foo
  $
So basically, this zero'd out every executable on the system.



Yep, that's bad.

Out of curiosity, what was the solution to fix all that?


Possibly a cp or an scp from a remote system with a working set of binaries.


scp was in /usr/bin, so we could at least copy enough basics from another system and recover the rest from a backup. Needless to say we lost the client contract.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: