Bluetrait

Loading
search


Posts:
Comments:

Popular posts

Click here if you are looking for Bluetrait, the weblog software.

Login:

Username:

Password:

Major opps!

Posted by Michael Dale on Wed, 16 Mar 2005 9:35 PM

Don't do this at home folks

chown -R root:wheel /

That was on my webserver with different users having access to their own home directory.

What did that command do? I over wrote the ownership of ALL files and made it owned by root. Which means things like sendmail don't work because it cannot access the sendmail file. Or users who cannot access their own files! Far out.

But I fixed it. I'm not too sure if there is an undo option (feel free to let me know) but I did the following.

Booted up my other freebsd box:

cd /

ls -la * | grep -v *root* > owners.txt

This outputted a file that listed all files that were not owned by root (there wasn't that many so I was safe), I then changed the permissions back on my server to match this.

I then needed to reset all the user home directories, but that wasn't too hard.

Far out! Don't do that EVER!

*logs out of root*