-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?

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...

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.