-   Linux From Scratch (
-   -   chown clfs:clfs mishap (

Louis_Carole 03-20-2007 08:57 PM

chown clfs:clfs mishap
Dear All,

Due to a syntactical mishap, I performed a

chown -R clfs:clfs /

BAD, right? I thought it might be a bit less bad if I then did

chown -R root:root /

And with only one non-root user of my making, I fixed it more with

chown -R me:me my-home-dir

I rebooted and am gui multi now, and... well... everything SEEMS ok.

There was a whole bunch of denied chown's, like... um... wait a second...

Um... now I can't su to root. So I can't access my error log to show you...

Hmmm... So, what's up? What did I do? What should I do?

- Ben

Zention 03-21-2007 02:41 PM

Well, you are not the first in the history of computing to do this.

You have borked the file permissions - so you will be spending quite sometime in the root account fixing the problems.

You cannot su to root because the su program now only allows the root user to execute it.

It is possible to bring the system back to life or you do a reinstall.

If you want a lesson in permissions that will last a lifetime, but take a day or so to do I would opt for the 'system back to life' approach.

Some people make a permission script after they do this - and I do think it is not a bad idea, others try to nerf chown -R, but often after doing this you tend to make sure you pause and reread the command before entering commands that contain recursion especially rm.

Louis_Carole 03-21-2007 06:07 PM

Dear Zention,

I like banging my head against walls. So I would opt for the 'system back to life' option. However, since I have no backup or other linux box to compare to (slapping self) I will be reinstalling Slack. And then preparing a script for the future.

You are correct, Zention. There is a long heritage of chmod/chown mishaps. I was unable to find a time it happened and the person did not opt for a reinstall.

- Ben

PS chown -R clfs:clfs /{,cross-}tools != chown -R clfs:clfs /{,cross-tools}

na5m 03-21-2007 06:51 PM

Can't you boot into single-user mode (run-level 1)?
Or just boot with a live cd, mount your partion and
do your repair that way. Let us know how it works
out for you. Good luck.

Zention 03-21-2007 07:40 PM

You just login as root, su - is just a convenience.

Alt F1 - F6 normally gives you a number of consoles.

Ctrl Alt F1 - F6 if in X.

And Alt F7 to return to X.

All times are GMT -5. The time now is 03:44 AM.