Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A shell script testing went bad and it issued

chmod -R 777 /.

to the system, instead of

chmod -R 777 ./

and as expected it wiped the critical meta data. We have turned off the system and it will not function properly the next time it is turned on.

I am told that

rpm --setperms -a 

rpm --setugids -a

should atleast fix the permission of the packages maintained by rpm. Is it worth doing?

And is there any script available which will copy the permission from an identical system? To atleast get the box working. The Box is running RHEL5.5


share|improve this question
possible duplicate of revert chmod 777 / -R – ThatGraemeGuy Jun 29 '12 at 7:37
@GraemeDonaldson Yes, but I am getting verified a possible solution and my platform is different. Just in case it matters. – user1263746 Jun 29 '12 at 7:56
up vote 4 down vote accepted

If your duplicate system is truly duplicate then you may have a chance with running

getfacl -R . >perms.bak

on the good system in / and then on the bad one

setfacl --restore=perms.bak
share|improve this answer
Well, I plan to make a new RHEL 5.5 box and then do the above procedures, that should fix the out of box packages, right? – user1263746 Jun 29 '12 at 7:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.