LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 03-20-2007, 09:57 PM   #1
Louis_Carole
Member
 
Registered: Feb 2004
Location: Oxford, OH
Distribution: LFS 5.1.1, Slackware 9.1
Posts: 94

Rep: Reputation: 15
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
 
Old 03-21-2007, 03:41 PM   #2
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
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.

Last edited by Zention; 03-21-2007 at 03:46 PM.
 
Old 03-21-2007, 07:07 PM   #3
Louis_Carole
Member
 
Registered: Feb 2004
Location: Oxford, OH
Distribution: LFS 5.1.1, Slackware 9.1
Posts: 94

Original Poster
Rep: Reputation: 15
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}
 
Old 03-21-2007, 07:51 PM   #4
na5m
Member
 
Registered: Jan 2005
Location: california
Distribution: O.A.M. (Overmonitoring Address Matrix) Release 2.2 with 2120 Patch
Posts: 37

Rep: Reputation: 17
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.
 
Old 03-21-2007, 08:40 PM   #5
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
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.

Last edited by Zention; 03-21-2007 at 08:45 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLFS: error while making texinfo 4.8 magesing Linux From Scratch 3 02-05-2009 11:17 AM
clfs X setup silkenphoenixx Linux From Scratch 8 10-26-2006 01:40 PM
How do I use GRUB with x86_64 CLFS? fatsheep Linux From Scratch 2 10-18-2006 12:58 PM
CLFS 1.0.0 Released mdh Linux From Scratch 1 09-30-2006 10:42 PM
CLFS Expect-5.43.0 caio53 Linux From Scratch 3 05-05-2006 08:16 AM


All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration