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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-20-2007, 08:57 PM
|
#1
|
Member
Registered: Feb 2004
Location: Oxford, OH
Distribution: LFS 5.1.1, Slackware 9.1
Posts: 94
Rep:
|
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
|
|
|
03-21-2007, 02:41 PM
|
#2
|
Member
Registered: Mar 2007
Posts: 119
Rep:
|
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 02:46 PM.
|
|
|
03-21-2007, 06:07 PM
|
#3
|
Member
Registered: Feb 2004
Location: Oxford, OH
Distribution: LFS 5.1.1, Slackware 9.1
Posts: 94
Original Poster
Rep:
|
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}
|
|
|
03-21-2007, 06:51 PM
|
#4
|
Member
Registered: Jan 2005
Location: california
Distribution: O.A.M. (Overmonitoring Address Matrix) Release 2.2 with 2120 Patch
Posts: 37
Rep:
|
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.
|
|
|
03-21-2007, 07:40 PM
|
#5
|
Member
Registered: Mar 2007
Posts: 119
Rep:
|
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 07:45 PM.
|
|
|
All times are GMT -5. The time now is 11:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|