Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can i fix the permissions?
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
elsenator
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 89

PostPosted: Mon Nov 20, 2006 7:05 pm    Post subject: Can i fix the permissions? Reply with quote

Ok, my ears are quite a bit red right now. I made a huge mistake while fiddling with my Gentoo based server. I accidentally executed "chown -R [user]:users" in "/"(don't ask me how, I'm too embarrassed to answer that :P) which, basically ruined the entire thing. I tried doing a "chown -R root:root" afterwards to see if it would fix things, but to my dismay the system seems to be acting really really weird.

So, i was wondering if there is a simple solution to this? Can i somehow apply a permission scheme to the system files to change them back into normal? The user dirs are, of course, easy to fix, but what about the rest?
Back to top
View user's profile Send private message
justwantstohelp
Apprentice
Apprentice


Joined: 29 Jun 2006
Posts: 251
Location: Sacramento, California

PostPosted: Mon Nov 20, 2006 7:20 pm    Post subject: Reply with quote

I'm sorry to say that such a thing is all but impossible. You're better off re-installing.
_________________
We need to shoot cops, and hang politicians. Concentrate the vision, concentrate the vision.
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Mon Nov 20, 2006 7:20 pm    Post subject: Reply with quote

well, i did the same thing once with /var and had to change everything manuallly. I suppose you could write a script to change everything automatically, but then you'd need to run it on a working computer with (mostly) the same files as you and get a list of permissions to set for each file on your fs.

for portage it would be easier to grab a new snapshot and reinstall portage. you'll loose your distfiles /usr/portage/distfiles though, you may want to backup that directory and change the permissions on the files in it manually.

i think someone once did this and i tried to help them, but they were set on reinstalling ... let's see if it's in my post history ... nope, guess they clear that out after a few months. too bad.

anyway i will happily help you get that list of appropriate permissions, but i'm not much for shell scripting.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
elsenator
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 89

PostPosted: Mon Nov 20, 2006 7:27 pm    Post subject: Reply with quote

Thanks for your replies. I'm heading for a reinstall then :/ Oh well, at least i learned not to type so friggin' fast while working as root.
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Mon Nov 20, 2006 7:28 pm    Post subject: Reply with quote

are you dead set on giving up? i still think you could bring your system back to life, but it would require a bash srcipt or two.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Mon Nov 20, 2006 7:29 pm    Post subject: Reply with quote

Ownership is harder to correct than permissions, but this thread covers a similar situation. If emerge works you won't need to reinstall from scratch, but you will need to rebuild everything to restore all the owners and permissions.

erik258 wrote:
i think someone once did this and i tried to help them, but they were set on reinstalling ... let's see if it's in my post history ... nope, guess they clear that out after a few months. too bad.
To browse all your posts, search for yourself in the memberlist and use the "Find all posts by ..." link. Clicking your username where it appears as a link (e.g., post lists) will also get you to that profile page.
_________________
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
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Mon Nov 20, 2006 7:48 pm    Post subject: Reply with quote

thanks dude, i finally found that topic.

here's a link, if you want to see the progress i made there. the script generates commands to set permissions properly.
https://forums.gentoo.org/viewtopic-t-449348-highlight-.html
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
elsenator
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 89

PostPosted: Mon Nov 20, 2006 9:58 pm    Post subject: Reply with quote

Thanks all :) I appreciate your suggestions. I don't usually go with the easy way in situations like this, but since it was quite urgent, i had to find a quick and easy way to get the system up and running again, so i ended up installing Xubuntu. Buuuut, Gentoo is still running on my other two machines. :D
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