Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ooops!!! Chmod /
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bonnyjoy
n00b
n00b


Joined: 12 Dec 2002
Posts: 19

PostPosted: Fri Nov 07, 2003 5:38 pm    Post subject: Ooops!!! Chmod / Reply with quote

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

Code:
chmod 600 /


as root and changed all the permissions of / :oops:

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
View user's profile Send private message
Ari Rahikkala
Guru
Guru


Joined: 02 Oct 2002
Posts: 370
Location: Finland

PostPosted: Fri Nov 07, 2003 5:49 pm    Post subject: Reply with quote

If you didn't use -R, it should be enough to just
Code:
chmod 755 /
as root
_________________
<laurentius> gentoo linux?
<ari> Yesh.
<laurentius> they look horny
Back to top
View user's profile Send private message
bonnyjoy
n00b
n00b


Joined: 12 Dec 2002
Posts: 19

PostPosted: Fri Nov 07, 2003 5:52 pm    Post subject: Reply with quote

Thanks very much for the quick reply.
Back to top
View user's profile Send private message
db_404
Guru
Guru


Joined: 05 Dec 2002
Posts: 336

PostPosted: Fri Nov 07, 2003 5:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
bonnyjoy
n00b
n00b


Joined: 12 Dec 2002
Posts: 19

PostPosted: Fri Nov 07, 2003 7:56 pm    Post subject: Reply with quote

Why would a reboot fix it?
Back to top
View user's profile Send private message
Roguelazer
Veteran
Veteran


Joined: 10 Feb 2003
Posts: 1233
Location: San Francisco, CA

PostPosted: Fri Nov 07, 2003 8:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
db_404
Guru
Guru


Joined: 05 Dec 2002
Posts: 336

PostPosted: Mon Nov 10, 2003 2:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Mon Nov 10, 2003 4:11 pm    Post subject: Reply with quote

/ 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum