View previous topic :: View next topic |
Author |
Message |
elsenator Tux's lil' helper
Joined: 19 Jan 2005 Posts: 89
|
Posted: Mon Nov 20, 2006 7:05 pm Post subject: Can i fix the permissions? |
|
|
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 ) 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 |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Mon Nov 20, 2006 7:20 pm Post subject: |
|
|
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 |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Mon Nov 20, 2006 7:20 pm Post subject: |
|
|
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 |
|
|
elsenator Tux's lil' helper
Joined: 19 Jan 2005 Posts: 89
|
Posted: Mon Nov 20, 2006 7:27 pm Post subject: |
|
|
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 |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Mon Nov 20, 2006 7:28 pm Post subject: |
|
|
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 |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Mon Nov 20, 2006 7:29 pm Post subject: |
|
|
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 |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
|
Back to top |
|
|
elsenator Tux's lil' helper
Joined: 19 Jan 2005 Posts: 89
|
Posted: Mon Nov 20, 2006 9:58 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|