Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@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 -
@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?
-
@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 ;)
-
Fradow9167y@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)
-
@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. -
OrestH7517yDamn, 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)
-
@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. -
@MoboTheHobo Thanks for making me understand, I am glad that you had an old backup
-
Grumpy28897yBefore 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. -
@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 ;) -
skords997yI have done this before. I learned it the hard way how little knowledge can be very dangerous.
-
Your friend clearly is unworthy of the mighty root powers. He should be banished from all systems and forced to use Windows ME.
-
mlask8547yJust like our colleague, except that he mounted root fs over nfs. And guess what happened...
-
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) ^^ -
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 😉 -
@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 ...
-
brett1234595y@darkShadow07 chmod 600 /file gives the files owner read+write permissions (no execute) for only the file owner while not allowing any other users to access that file. chmod 600 -R / applies these permissions on every file on the server. If that command was successful I highly doubt he would be able to run the second command because there would be no execute permissions on /sbin/chown. However chown root -R / changes the owner of every file on the server to root
-
john-doe9395yReally? I'd rant about you not being smart to have automatic provisioning and backups. 🙃
-
@galileopy I posted above, that I played back in a backup.
But over 250 Player Inventory in Minecraft were reset trough that and the Server crashed ;) -
ken705ythis is what most of my customers did when I worked at one big linux vendor in the support department, but they weren't that polite, they only said DO THE NEEDFUL. I did 4 years there, my mind is screwed forever.
-
@Ranchonyx He removed his own 'execute' permission on all files. He locked himself out and he can't do anything on the server now. He can't repair the situation since he can't execute anything.
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
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
rant
just a side story
fml
linux