You are not logged in.

#1 2009-09-22 16:46:40

battlepanic
Member
Registered: 2009-08-22
Posts: 76

DUMB MOVE: sudo chown -R notroot:notroot /*

The title pretty much says it all.  I changed the owner/group of everything below / to something other than root.  Commands suddenly stopped working.

I rebooted, logged in as root and tried to make things better by performing the same command, but this time setting everything to root except for my home directory.  I'm sure not everything in the filesystem was originally set to root:root but hopefully this would get me closer to a working system.  Unfortunately sudo still wouldn't work, giving the message:

sudo: must be setuid root

I set the setuid flag on the sudo file.  Sudo now works. 

Next step... Under my usual username I tried to start X.  X no work...

Cannot move old logfile ("/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"

So, I set the setuid flag on /usr/bin/Xorg and now X starts up great.  However, I get the feeling this setuid business might be a kludge, allowing said programs to effectively run as that program file's owner (now root).  Now, I'm thinking that the fewer things I have running as root, the better.  As such, my current fix doesn't seem ideal.

My screw-up didn't involve messing with the permissions in any way; I just changed the _ownership_ of everything in a very bad way.  So if it's an ownership issue why should I be messing with setuid flags?  Are setuid flags somehow turned off when ownership of a file is changed or is this setuid flag business just an alternate solution/workaround to my ownership problem?

More importantly, is there a reasonably painless way that I can restore all my installed packages and their associated files to their original ownerships.  This would basically be a reinstall using the list of packages I already have installed as a reference, saving me the trouble of manually selecting all my currently installed packages.  I looked at the pacman man page but nothing jumped out at me.  Any thoughts would be greatly appreciated.

Last edited by battlepanic (2009-09-22 22:02:16)

Offline

#2 2009-09-22 17:27:20

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: DUMB MOVE: sudo chown -R notroot:notroot /*

*lol* Welcome to the club - been there, done that - and it is _not_ recommended!
I believe I resorted to a reinstall in the end - it just caused too many problems.
So take a bite out of the sour apple, back up your home directory and do a complete reinstall.

And ... I bet you 10 to 1 you aren't gonna do the same again - ever!!

Offline

#3 2009-09-22 19:40:48

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

Re: DUMB MOVE: sudo chown -R notroot:notroot /*

If you end up re-installing if you save the package files in your /var/cache/pacman/pkg and a list of packages installed now, you'll probably save yourself some time; having a copy of your old /etc around is probably a good idea too.  Spoken by someone who has done many OS-reinstalls.

Offline

#4 2009-09-22 20:50:40

*david_a*
Member
Registered: 2009-06-19
Posts: 80

Re: DUMB MOVE: sudo chown -R notroot:notroot /*

Is the list given by

pacman -Qe

any use to you?

Offline

Board footer

Powered by FluxBB