[nycbug-talk] Yup, I did it: chown -R ....

Dru Lavigne drulavigne at sympatico.ca
Fri Nov 7 12:58:24 EST 2008



>I've felt horrible for a few days now, and it shows.  I meant to chown -R
>root:users /some/directory but ended up doing it to the root.  I ctrl-c'd
>about 2 seconds later but damage was already done.
>
>Luckily, I have a few other boxes and I compared them to this one with a
>custom script and was able to get the group back to where it was, but I'm
>afraid I set files that shouldn't be owned by root to being owned by root.
>
>At this point, I'm just wondering if I'm missing anything, or if there is
>a program out there that will run through your user:group/permissions
>settings (of course on system files only) verifying they are set correctly
>compared to the base install or something.


Assuming /some/directory came with the system, mtree is your friend. Page 88 
of BSD Hacks gives an example of recreating var as follows:

mtree -deU -f /etc/mtree/BSD.var.dist -p /var

Cheers,

Dru





More information about the talk mailing list