View previous topic :: View next topic |
Author |
Message |
bonnyjoy n00b
Joined: 12 Dec 2002 Posts: 19
|
Posted: Fri Nov 07, 2003 5:38 pm Post subject: Ooops!!! Chmod / |
|
|
I've just been following the guide to set up an e-mail system for the home network and everything was going fine until I accidentally typed
as root and changed all the permissions of /
Now I can't log in as a normal user or perform any actions on the consoles that I am already logged in as.
Can someone guide me in the right direction as to getting my box back to useable. |
|
Back to top |
|
|
Ari Rahikkala Guru
Joined: 02 Oct 2002 Posts: 370 Location: Finland
|
Posted: Fri Nov 07, 2003 5:49 pm Post subject: |
|
|
If you didn't use -R, it should be enough to just as root _________________ <laurentius> gentoo linux?
<ari> Yesh.
<laurentius> they look horny |
|
Back to top |
|
|
bonnyjoy n00b
Joined: 12 Dec 2002 Posts: 19
|
Posted: Fri Nov 07, 2003 5:52 pm Post subject: |
|
|
Thanks very much for the quick reply. |
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Fri Nov 07, 2003 5:58 pm Post subject: |
|
|
Could have been worse, rm -rf for example.
If you still have a root shell open 'chmod 755 /' should fix it.
If not (I'm assuming you are in X) so hit Crtl-Alt-F2 to get to a login prompt, try logging in as root and 'chmod 755 /'
If that doesn't work then a reboot should fix it.. |
|
Back to top |
|
|
bonnyjoy n00b
Joined: 12 Dec 2002 Posts: 19
|
Posted: Fri Nov 07, 2003 7:56 pm Post subject: |
|
|
Why would a reboot fix it? |
|
Back to top |
|
|
Roguelazer Veteran
Joined: 10 Feb 2003 Posts: 1233 Location: San Francisco, CA
|
Posted: Fri Nov 07, 2003 8:09 pm Post subject: |
|
|
Well, one would think that any system with any intellect behind it would see that the entire filesystem had been made unbootable and would repair it... _________________ Registered Linux User #263260 |
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Mon Nov 10, 2003 2:33 pm Post subject: |
|
|
I suspect it's because '/' isn't really a real directory, I would imagine it's just a created by the OS as the 'root of all mountpoints'.
How did I find out that a reboot works? Well, I tried chmodding / on a scrap box here - realized I had no keyboard or monitor to connect to it, and ssh wasn't proving all that usefull anymore, and reached for the power button.... |
|
Back to top |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Mon Nov 10, 2003 4:11 pm Post subject: |
|
|
/ is a real directory. It belongs to the partition that is mounted as /
And no, Linux will not automatically fix anything for you. How does it know you actually did or didn't intend to do that?
The superuser bypasses all permissions (except execute, suid and sgid) - there shouldn't be a problem reverting it. |
|
Back to top |
|
|
|