nathaniel":1gfj6rir said:
no matter how many times I tell/beat/rape/yell at my developers about chmoding I still see this crap in push scripts:
cd <non-existing directory>
chmod -R user1:nobody .
and if they ran as root well I'll be restoring a server from a backup over night.
Reminds me of an Indian developer I had the pleasure of "working with" at an old job. He was supposed to install some home grown application on a Solaris zone, this required root privileges for some reason, normally I really really don't want to give developers root, but he was supposedly a "Solaris technician" or some such, and someone higher up decided that giving him the root password was the way to go, so yeah...
I come in to work the next day, I see a mail from said developer complaining that the zone is down, I wonder how the hell that happened, I try to loginvia SSH, no dice. I try to login via the zconsole, no dice. I check the file system from the global zone, the messages log is full of warnings about file permissions for PAM modules, SSH keys, etc etc.
Turns out the guy had to install something in /opt/whatever, and he couldn't do this as his regular user. The solution?
su -
cd /
chmod -R 777 *
Funny thing is, after I restored the zone and kindly asked him not to ruin it again, he went ahead and did the same thing again, only this time he limited his chmod'ing to /opt. Unfortunately there was lots of other software living in /opt and all that got completely hosed, so we had to do a second restore, and my project manager told his Indian counterpart that we would refuse to give this particular developer any access whatsoever ever again. The Indian counterpart was understanding and removed the offending developer(who was by then known as Mr Chmod) from the project as a whole, he didn't seem all that surprised. I guess Mr Chmod has a history of some sort.