[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Recovering from "chown -R" disaster
- From: "Jóhann B. Guðmundsson" <johannbg hi is>
- To: "Red Hat Enterprise Linux 4 (Nahant) Discussion List" <nahant-list redhat com>
- Subject: Re: Recovering from "chown -R" disaster
- Date: Thu, 13 Sep 2007 22:09:36 -0000 (GMT)
> Please start new threads!
>
> Am Donnerstag, den 13.09.2007, 16:34 -0500 schrieb Michael Weber:
>> Hey, all!
>>
>> I did a bad one. I was in the wrong directory and did a chown -R
>> oracle: * and munged up my system. It looks like there was a symlink
>> somewhere back to the root because all of the files and folders,
>> including /, were owned by oracle.
>
> man chown says:
> -P do not traverse any symbolic links (default)
>
> so I don't think that was the problem.
>
> If your software is installed from rpms, you can query the rpmdb to ge
> the owner information out again.
>
> Next time you can use getfacl to backup the info, and setfacl to restore
> it.
>
> --
> nahant-list mailing list
> nahant-list redhat com
> https://www.redhat.com/mailman/listinfo/nahant-list
>
For restoring default file permissions on packages..
for p in $(rpm -qa); do rpm --setperms $p; done
for p in $(rpm -qa); do rpm --setugids $p; done
and for home directorys..
for u in `ls /home`; do chown -R $u.users /home/$u/; done
Best regards
Johann B.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]