Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was altering permissions to log files and accidentally gave 777 to root. Doah. Could be worse I guess. And I caught it immediately and canceled the command's execution.

Except the accident brought to mind that I run in root a lot. I use both Macintosh and Linux. Mac has a repair permissions utility. What about Linux? I there a utility to restore Linux (and in my case Fedora) to baseline user, group, and permissions to ensure the system will boot?


UPDATE: Been a few weeks now and no new problems found. I'm going to accept that this is solved.

share|improve this question
    
Which distribution? –  h0tw1r3 Jul 27 '11 at 16:21
2  
/ or /root? And I assume you added -R for recursive? –  Daniel Beck Jul 27 '11 at 16:28
    
... my first though would be to reinstall. The permissions on a Linux system tend to get rather complex in a short amount of time, due to the fact that many daemons you install have their own users, and their own groups, and the average system user (i.e your login) has at least 5 groups they are a part of. –  new123456 Jul 27 '11 at 16:39
    
Fedora 15; it was "/" with recursive (>_<) –  xtian Jul 27 '11 at 19:17

1 Answer 1

up vote 4 down vote accepted

For rpm based distributions it's easy to reset all managed files back to the installed state.

rpm --setugids -a # To reset ownership
rpm --setperms -a # To reset permissions

Replace '-a' with package name(s) to limit reset.

share|improve this answer
    
Yeah! I'm using Fedora 15 and YUM which is rpm based... –  xtian Jul 27 '11 at 19:20

Your Answer

 
discard

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.