Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "chown"
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 LIFE33
Now, I work at a hosting company in the UK, as a linux support engineer. I've seen many cases where a number of clients ran one of the following:
rm -rf / something
rm -rf /var/cache (attempt to magento)
chmod 777 /var
chown -R user:user /*
Half the time, they're like "Hey guys, I dun did fuck up, please help!". The other half of the time, they piss me off. Here's a number of responses that really grinds my gears:
"Such a harmful command should really prompt for input before running" -- From the buy you "forced" a recursive rm command, which mutes such a feature.
Client: "I did no such thing"
Me: "I've seen the command history, and at the time the command was run, you were the only person logged in"
Client: "You're mistaken, You're reading the information wrong"
Me: "I assure you, I'm not, I know what I'm looking at"
Client: "Well you're a shit engineer"
Me (thought): "Says the fucker who doesn't know how to linux"
I like people who own up to fuck ups. But the ones that don't, are just making their lives harder, since we have all the evidence in front of us.
Most of these people are the developers, and in some cases, the sysadmins...4
N e v e r, fucking e v e r chmod/ chown permissions recursive on the linux /etc folder❗
I did yesterday (, because I am fucking dumb and know little about linux systems) and got the result today. My whole mailserver wasn't working.
After fucking tons of googling and searching and log-digging I found that postfix and opendkim require specific permissions on their respective folders and files.
After changing a fucking amount of permissions on those fucking files the fucking mailserver worked and I can send and receive mails, now. 😤😤😤
What a torture. Lesson learned. Never will repeat this mistake.16
I previously worked as a Linux/unix sysadmin. There was one app team owning like 4 servers accessible in a very speciffic way.
* logon to main jumpbox
* ssh to elevated-privileges jumpbox
* logon to regional jumpbox using custom-made ssh alternative [call it fkup]
* try to fkup to the app server to confirm that fkup daemon is dead
* logon to server's mgmt node [aix frame]
* ssh to server directly to find confirm sshd is dead too
* access server's console
* place root pswd request in passwords vault, chase 2 mangers via phone for approvals [to login to the vault, find my request and aprove it]
* use root pw to login to server's console, bounce sshd and fkupd
* logout from the console
* fkup into the server to get shell.
That's not the worst part... Aix'es are stable enough to run for years w/o needing any maintenance, do all this complexity could be bearable.
However, the app team used to log a change request asking to copy a new pdf file into that server every week and drop it to app directory, chown it to app user. Why can't they do that themselves you ask? Bcuz they 'only need this pdf to get there, that's all, and we're not wasting our time to raise access requests and chase for approvals just for a pdf...'
oh, and all these steps must be repeated each time a sysadmin tties to implement the change request as all the movements and decisions must be logged and justified.
Each server access takes roughly half an hour. 4 servers -> 2hrs.
So yeah.. Surely getting your accesses sorted out once is so much more time consuming and less efficient than logging a change request for sysadmins every week and wasting 2 frickin hours of my time to just copy a simple pdf for you.. Not to mention that threr's only a small team of sysadmins maintaining tens of thousands of servers and every minute we have we spend working. Lunch time takes 10-15 minutes or so.. Almost no time for coffee or restroom. And these guys are saying sparing a few hours to get their own accesses is 'a waste of their time'...
That was the time I discovered skrillex.6
I've been playing around with my phone over SSH and it's been a fun, useful learning experience. I learnt that -
1. I need to get better at chmod, chgrp and chown.
2. My script to control the router light doesn't work on my phone, why?
2.5. Oh, I needed to turn off Tor this whole time? Oh, that also means I'd have to block every app on NetGuard except Firefox, just to run that script or configure the router - wow.
3. I can control my phone's LEDs manually? Cool.
4. Linux is fun.
The ability to ssh to an Earth terminal.
chown -R sionc /socialmedia/facebook
chown -R sionc /alphabet
I would then have the resources to do way bigger projects. Elon Musk can keep his businesses though. I like Elon Musk.
I'd maybe chown my company too, just for fun.
I'd ping my fiancé everytime she goes in a mood and ignores me for half an hour. She'd have to respond and it would annoy her. :3
userdel could be used on the bad people. >:)
There's probably a whole list of these that I've not even thought of that I'll see people write in the comments. I'm pretty sure this could get dangerous.6
Executed chown -R www-data:www-data /var/www on my server without even thinking.
Not long after I panicked for a few seconds while checking if everything was still working. I didn't know if this command would break stuff or not.
So glad all websites are still working.
Now I'm sitting here thinking: was I braindead while executing the command??
All I wanted to do was set the right permissions for certain folders because images couldn't be uploaded with PHP.6
Been using Linux since 99' and only just now discovered chown --reference can be used with . so you can fix janky folders in a jiffy.