[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

changed ownership of / by mistake...



Hi all,

I am in need of some BIG help. I am an idiot! I did something stupid
on my home server. I wanted to change the owner and group of all the
files within a folder to myself (craig). I was already in directory
/mnt/sda/
(logged in as root) and I entered:

# chown -R craig:craig /*

instead of
# chown -R craig:craig ./*

I realized this right after but wasn't sure how to undo what I had
done. when I checked out
# ls -l /

sure enough everything showed up as craig:craig. Tonight I tried to
see what had happened and tried to su to root and got an error message
saying I couldn't do that. (I can log in as root remotely via ssh
still.) I figured this had to do with the BIG change of ownership. I
figured that I should try to change everything to owner root as a
start. But for some reason
# chown root /*

DOESN'T work! (note - I was logged in as root when I tried this). I
tried to change just a single directly(/etc), or a single file
(/bin/su)... with the same result. I enter
# chown root /etc
or
# chown root:root /etc/

and it returns without error, but with no changes made. I also tried
changing some files to staff group .... only to be told this group
does not exist. It always did before and it is still there in
/etc/groups. hmmm....

I restarted, and now X doesn't work properly. X does load and starts
up gnome, but it fails at some point. I get a terminal in the corner,
I can move the mouse and click on an error mesage, but I can't use
that terminal, and no other gui elements show up (task bar etc).

I tried booting into a live CD of Ubuntu amd64 and then repairing
things via a chroot - but that won't let me change ownership either.

I tried to do something like this:
# mv /etc /etcOLD
# cp -R /etcOLD /etc

Which DID give result in ownership:group being root:root. But the gui
system is still unusable. NOTE- the underlying system seems to work. I
can use a shell (CMD-ALT-F2) and I can log in via ssh.)

WHAT I WANT------->

Can anyone suggest how I might be able to fix all the screwing up I have done?
Is there anyone to put permissions and ownership back the way it
"should" be? On my mac computer there is an option to "repair
permissions" which I would love to have on Linux but don't think it
exists.

Any help at all would be MUCH appreciated.

Craig Hagerman



Reply to: