[3335] in RedHat Linux List
Re: chown as root
daemon@ATHENA.MIT.EDU (Eric Smith)
Fri Nov 8 02:50:41 1996
Date: 8 Nov 1996 08:39:21 -0000
From: Eric Smith <eric@brouhaha.com>
To: redhat-list@redhat.com
Cc: Jason Benderly <jbenderl@painewebber.com>
In-reply-to: <Pine.LNX.3.95.961107221821.25427C-100000@helix.cs.cuc.edu>
(message from Elliot Lee on Thu, 7 Nov 1996 22:18:52 -0500 (EST))
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
I wrote:
> The real solution to the original problem (acidentally changing the
> ownership of *everything*) is to somehow extract the original ownership
> information from the RPM database, and process it with a script that sets
> the ownership. However, I can't find an rpm query option that gives the
> ownership. "rpm -qal" only gives the file paths; if there was only some way
> to coax it to give more detailed info...
From: Elliot Lee <sopwith@cuc.edu> wrote:
> rpm -qlav
Thanks! So the fix to Jason Benderly's problem is to run the command:
rpm -qlav | awk '{ system ( "chown " $2 ":" $3 " " $8 ) }'
However, I'm not about to try it on my system, so I don't guarantee that it
will work.
Eric
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null