2

So I have a bit of an issue. I accidentally chown'd everything to my user, recursively.

sudo chown -R me:me /*

I meant to only do this to one directory which I thought I was in.

I cancelled it very quickly (3 seconds?) and I'm not sure how much damage I caused, but what I do know is that I can't use the system properly anymore.

Here's an image of who owns what at this time: (yellow = stuff I accidentally chown'd)

enter image description here

(CentOS)

I assume I'm going to have to move all of my files and stuff off the machine and reinstall, but I'd rather not, obviously.

Right now I can't use sudo or su:

/etc/sudo.conf is owned by uid 1000, should be 0
/etc/sudoers is owned by uid 1000, should be 0
no valid sudoers sources found, quitting
unable to initialize policy plugin

It's an OVH machine (i7 4970k) and I don't think the IPMI is working (or I just don't know how to use it... I think that's the case)

Is there any hope in fixing this?

CT16
  • 21

1 Answers1

1

OVH have rescue boot / boot over network mode, you can correct the majority of files / dirs using this to get you back up as a temp measure...

(boot into resucue mode, mount your server disk in /mnt, then chown stuff back to root...)

ideally you'll be looking to re-install.

a suggestion would be to settup VM, even if you only use one VM, this way you can always open a console. Give ovirt a try...

mikejonesey
  • 2,030