RE: chown command goof up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Quoting "Ross S. W. Walker" <rwalker@xxxxxxxxxxxxx>:

>
> Yup, just popt aliases, found in /usr/lib/rpm/rpmpopt-4.3.3
>
> rpm     alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] ||
> chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
>                    --pipe "grep -v \(none\) | sed 's/chmod .../chmod /'
> | sh" \
>         --POPTdesc=$"set permissions of files in a package"
>
> rpm     alias --setugids -q --qf \
>         '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape}
> %{FILENAMES:shescape}\n]' \
>         --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\"
> \"$3\"; }';grep -v \(none\))|sh" \
>         --POPTdesc=$"set user/group ownership of files in a package"

   So if I'm following this right, then I just need to run rpm --setugids `rpm
-qa` as root, from /, and this should set the owner & groups on all files,  as
appropriate? Except for of course the files in /home?
    As for my original plan, I saw krename in yum. At first glance, that looks
like it should do what I wanted. Anyone have experience with it?

-- 
--- David Woyciesjes
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux