CHOWN Mistake

aED

Verified User
Joined
Dec 20, 2009
Messages
42
I have issued a chown comman to my root / to a different user and now my server is trashed is there any way to undo that? Im lucky I made a backup earlier but Is there a way to revert that easily without using my backup?
 
I'm presuming you did this recursively. Otherwise just look at another system and fix the ownership of the / directory files and directories.

But if you did it recursively ...

then...

I don't think the DirectAdmin set_permissions script is going to fix everything, but you should start by trying it:
Code:
# /usr/local/directadmin/scripts/set_permissions.sh
If you know what all ownership should be then you may be able to fix it with some complex scripting, but I'm not sure that would be time-effective.

Learn from your mistakes.

Jeff
 
I remember the first time I did:
Code:
rm -f /*
instead of what I meant, which was:
Code:
rm -f ./*
I learned a lot that day, which was probably about 20 years ago.

Jeff
 
ehhe. i did the same when i started hosting... like 6years ago xD i was so damn pissed :D stopped the command but worked till i restarted it XD
 
Back
Top