-2

I've screwed my CentOS 6 server. I've ran chmod on a few symlinks and changed permissions important file such those in /bin and all commands even clear says Permission Denied. Now It is unable to boot.

How do I restore permissions?

  • 3
    http://serverfault.com/a/469079/984 http://serverfault.com/questions/105957/accidently-ran-chown-www-datawww-data-r-as-root/106057#106057 http://serverfault.com/questions/403321/chmod-r-777-rhel-5-5 – Zoredache Sep 26 '13 at 00:25

2 Answers2

2

Honestly, boot a live cd and grab a backup of the files you need. Then head to re-install town.... :(

You MIGHT be able to install over your broken version and only break a few [hundred] things...

Daniel Widrick
  • 3,418
  • 2
  • 12
  • 26
2

Sounds like you've overly restricted a bunch of system directories. Before I tell you how to solve your immediate issue you should know that default permissions differ throughout and there's no simple way I can think of to recover this without backup recovery or some level of re-installation. The security and stability of the system may be seriously compromised.

  1. Boot from some sort of Linux Live CD/USB
  2. Mount your system partition.
  3. Ensure bin/* is still owned by root.
  4. Change bin/* permission to 755. Note: Permissions 755 makes the file readable and executable by all. I would certainly not do this in a directory like /etc or /var.
Bob Barker
  • 129
  • 1