835

My Friend: Dude our Linux Server is not working anymore!

Me: What? What did you do?

My friend: Nothing I swear!

Me: But you were last on it?

My friend: Yes. I just wanted to run a bash file and needed to give it permissions.

Me : WHAT DID YOU ENTER???!

My Friend: Chill man, just this command I found on the internet
chmod -R 600 /
chown -R root:root /

Me: WHY ARE YOU EVEN IN ROOT AND GOD DAMMIT WHY ARE YOU EVEN USING SOME RANDOM COMMAND FROM THE INTERNET. YOU KNOW YOU SHOULD NOT DO THIS OR JUST ASK!

My friend: Ok I did something wrong, how can I fix it?

Me: Did you make a backup or rsync of the server?

My friend: No. I just wanted to run this file.

Me: You holocausted the server. FUCK MY LIFE

Comments
  • 43
    Like every 2-nd day at work.
  • 30
    That's why I'm the only one that accesses the servers 😱
  • 3
    How was he even able to do that?
  • 17
    Push the server to github? 😂
  • 35
    @Charmgoggles I gave him the root account for emergency's when I cant access the servers and need on too.

    I told him then, that this is just for the worst possible situation and I would call him and tell him what to do or not.

    Haha guess what? Reads online root acces needed and straight logs in without asking :P
  • 4
    @MoboTheHobo I am not well versed with linux but I know what chmod, chown are for but I wanted to know what exactly those commands did? Why server became unusable?
  • 4
    @KnightsOfCode Thank you for your concern. I'm not in any troble, was just a small private server with teamspeak and Mailserver. Had a older Backup lying around ;)
  • 7
    @darkShadow07 He granted root permission to some script downloaded from the internet. I assume the script was malicious from the tone, and when you run a malicious script with root permissions, it's basically game over for your server, you need to reinstall everything from scratch (even if you find a virus, you cannot be sure you found ALL virus)
  • 16
    @darkShadow07 the / at the end gives the command to use it for the whole server. Here the explanation: https://cyberciti.biz/faq/...

    1. Whole Server Files were 600 and for all owner/group was root.

    2. Permissions system breakdown. No service works anymore like apache user. You can't really repair it without a backup, or you would need to check every little file. Thats almost impossible.

    3. When you would give chmod 755 for all again to work, you kernel would refuse it and also your system would be insecure, everybody could read files and use holes.
  • 3
    Damn, what an idiot... Do you have your server running locally? If you can boot a Live CD you can chmod back some data, but if you have a remote server, well, IDK how to restore that)
  • 7
    @OrestH It's fine again, everything running good and the backup was ok.

    My Hoster has a rescue system where you can upload you old backups and it mounts them on the machine.
  • 1
    @MoboTheHobo Thanks for making me understand, I am glad that you had an old backup
  • 26
    Before trying random commands and scripts found on the internet, one should always make the "Is the internet safe"-test.

    It's easy to do. Just mix some drugs from random recipes found online. The ingredients can probably be found in random web shops. Now, try the drugs. If you don't get irreparably and possibly fatally poisoned, then the internet is a safe place were everyone is honest and benevolent. If not, collect the Darwin awards.
  • 1
    What does these commands do btw.
  • 11
    My sides are in orbit! Holocausted! The one time this word actually is properly used in a non offensive but verbally fierce way! Have lots of upvotes!
  • 3
    @anup-dhabarde

    Chown is for setting Owner and Group of files. (User who can run it)

    Chmod is giving or removing permission to run it on different user levels or even just run it. You can set here read, write, execute permissions.

    I already answered the same question above for darkShadow07. Just scroll a bit up ;)
  • 1
    @MoboTheHobo you're lucky one)
  • 2
    I have done this before. I learned it the hard way how little knowledge can be very dangerous.
  • 4
    Had me at "holocausted the server" :D
  • 4
    Glad you didn't Gitlab the backups! 😁
  • 5
    Your friend clearly is unworthy of the mighty root powers. He should be banished from all systems and forced to use Windows ME.
  • 2
    Just like our colleague, except that he mounted root fs over nfs. And guess what happened...
  • 15
    I love those "new verbs":
    # Gitlab backups
    # holocaust projects
    # volkswagen unit tests (basically pretending that all checks are good by just returning true instead of actually checking stuff) ^^
  • 2
    Lol thanks guys for 500++. Didnt think that my rant would get this much attention 😂.

    Well, next time I can use the stress ball in need 😉
  • 8
    Hahaha this reminded me of one time I heard someone yelling "THE SERVER IS DOWN! JESUSFUCKINGCHRIST" and, in fact, the server was down. On the floor.
  • 1
    and this is why i never give my friends root
  • 1
    @skords it's good to learn it on your own system though . I destroyed my Ubuntu few times but I also found the way how to bring back my files. Then if you come to prod you have amazing respect before trying something ...
Your Job Suck?
Get a Better Job
Add Comment