[rhelv6-list] yum reinstall permissions bug?
Robin Price II
rprice at redhat.com
Mon Dec 5 16:24:36 UTC 2011
On 12/04/2011 06:34 PM, dsavage at peaknet.net wrote:
> I recently found myself needing to use yum to reinstall all the packages
> on my RHEL6.1 server to correct their ownerships inadvertently changed by
> a rogue script. Afterwards I noticed that there were still several dozen
> packages with the wrong permissions (Modes, according to 'rpm -V'). These
> same packages had just been reinstalled by yum.
>
> If yum's reinstall does not restore permissions to their original values,
> is that a bug? Or is there another preferred way to do that?
>
Mr. Savage,
You should be able to recover by following this kbase:
How do I reset the ownership and permissions of files installed by the
Red Hat Package Manager (RPM) under Red Hat Enterprise Linux?
https://access.redhat.com/kb/docs/DOC-25162
I have done this myself and ended up scripting something up like:
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 -Rh $u.$u /home/$u/; done
I have never done this from yum.
HTHs,
~rp
--
+-----------------------------[ robin at redhat.com ]----+
| Robin Price II - RHCE, RHCDS, RHCVA |
| Technical Account Manager |
| Red Hat, Inc. |
| w: +1 (919) 754 4412 |
| c: +1 (252) 474 3525 |
| |
+---------[ Dissenters will inevitably abhor. ]-------+
More information about the rhelv6-list
mailing list