WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

275

(post is archived)

I had a database admin run chmod 775 from root once, that was fun to fix.

[–] 0 pt (edited )

Globally across the whole filesystem?

edit:"from root once" my mind inserted "shell" in that.

Yes the whole file system. I was sitting in my office doing System Manager shit and my phone starts ringing, shit stopped working all over the system. Then about 2 seconds later this guy runs in and says please don't be at me, I said what the fuck did you do? Luckily I was logged into the system as root already. So I started fixing the /dev rights and the system directories /sbin /bin. With as close to the rights as I figured they should be. Got the system running again mostly stable. Then called HP and said how do I read what the default rights were as installed from the install CD Rom? They gave me the filename that had all the default system file rights in it. Wrote me a slick little program and fixed all the rights. Bada bing Bada boom. I told him if he ever did anything like that again, I'd break all his fingers, one at a time.

[–] 0 pt (edited )

With rm put the flags at the end.

rm * -rf

Not dangerous until the last key strokes so you have a chance to think about what you are doing.

Let's say I'm deleting a directory addressed from root. Key by key with tab completion.

rm -r /
rm -r /h
rm -r /home/
rm -r /home/x
rm -r /home/x0x7/
rm -r /home/x0x7/.
rm -r /home/x0x7/.s
rm -r /home/x0x7/.ss
rm -r /home/x0x7/.ssh

How many of those could be disasters with one mis-click of enter. 4/9

But put that r at the end at it actually does it's job, acting as a final sign off on deleting a directory, which is the point of it's existence.

[–] 0 pt

The Recursive and Force flags can get you in trouble no matter what command you are using.

[–] 0 pt

Which is why I always put them at the end on all commands. Then all commands are inherently safe(er) unless I add those flags at the end, at which point I re-read the line not trusting what I typed.

One of my favorite things about Unix is that it doesn't ask me question like "Are you sure you want to do this?", "Are you really sure you want to do this?", "Are you really really sure you want to do this?". Like Everything MS produces, but if you've got your head up your ass, you can sure fuck up in a hurry.

[–] 0 pt

But are you sure you are sure you're sure? Click on clippy to indicate your are sure.

All the guys I trained I told them before you run any destructive command. First you run a cd and make sure you're in the directory you want to be in then type the command out then reread it twice before you hit that enter key.