cd /etc/ chmod -R 664 .
*SHIT!*
If you find you did an accidental chmod -R, you may be able to restore it.
- Make sure SSH login keeps working (chmod -R 0600 /etc/ssh )
- Install a similar machine
- On that machine, issue this command:
find /etc/ -exec stat --format "[ ! -L \"{}\" ] && chmod %a \"%n\"" {} \; >chmod_fixer.sh
- Copy that file to the f*cked up box
- Chmod +x chmodder.sh
- Execute chmodder
You might want to install the software on the chmod-sourcebox to make sure the two boxes look alike.