View previous topic :: View next topic |
Author |
Message |
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
Posted: Thu Jul 16, 2009 2:04 am Post subject: Chmoded / with 755. Need help |
|
|
Hi all,
While working as SU I've chmoded my / (root) with 755 by mistake (yea, stupid me). I've stopped the processes when i saw too many lines go by but at that point it was down to the /proc.
Is there a way to tell the system to fix the permissions? What can i do to make my system safe and "right" again?
Thank you _________________ Gentoo Unanswered Questions- Give it a try! |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Thu Jul 16, 2009 6:07 am Post subject: |
|
|
Restore from a backup. You've got one, right? ;] |
|
Back to top |
|
|
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
Posted: Thu Jul 16, 2009 6:15 am Post subject: |
|
|
Yes, but it is old.
Is there any way to have the system check it's own permissions and then set them the way they should be (like during the install?).
I'm running PHP+MySQL+Apache site on this machine. In the worst case i can rebuild it, but i would REALLY rather fix the problem.
Any ideas? Is there a script that could get file permissions from a similarly build machine and then set them for all the files present in both? That would fix almost all permissions and the rest i can do by hand.
Thanks all _________________ Gentoo Unanswered Questions- Give it a try! |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Thu Jul 16, 2009 12:59 pm Post subject: |
|
|
Code: | find * / -printf "%m %p\n" > filename | Will give you the xxx octal permisions in the first column and then the full name with path after a space. One file per line. So it should be something like: Code: | for i in `cat filename`; do chmod ${i}; done | Although I'm not exactly sober right know - better wait for someone else to check that... |
|
Back to top |
|
|
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Thu Jul 16, 2009 3:00 pm Post subject: |
|
|
Moved from Other Things Gentoo to Duplicate Threads.
Please search before posting. See Accidentally chmod'd everything 777. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
|