chown user:user -R on /var : any chance to recover

Amedee Van Gasse (ub) amedee-ubuntu at amedee.be
Mon Jan 18 09:37:12 UTC 2010


On Sat, January 16, 2010 19:34, Stefan Onken wrote:
> Leonard Chatagnier schrieb:
>
>> Hear is a copy of my /var folder using ls -al which will likely fix your
>> issue if you change ownership to agree:
>
> Thank you.
> I did on another Ubuntu machine:
>
> find /var -type d -ls | awk '{printf "chown -R %s:%s \"%s\"\n", $5, $6,
> $11}' > script.sh
>
> And moved this script to the broken machine and started it.. Thats did
> the trick (for further reference *G*)

Thanks!
I made the same mistake once... on /! I was really pwnd... :-D
Your solution is more elegant than the ugly hack I used. And I'm not going
to tell what I did. But it was not *very* ugly, because I had recent
backups that included most (not all) of the important bits. I revised my
backup strategy after that incident. Now I backup the entire system, not
just /etc /home and /var. Because the other bits are small in size, and
they don't change much anyway.

-- 
Amedee





More information about the ubuntu-users mailing list