Re: [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly

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



Dear Ralph,

Great! Thank you very much for the tips!

Yours sincerely,

Xianwen

On 08/09/2019 15.11, Ralph Corderoy wrote:
Dear Xianwen,

there are quite many files on my system that had wrong permissions or
GID's.
Perhaps there's been an errant recursive chmod or chgrp in the past by
root.

Is there a way to automatically correct all the permissions and GID's?
Others like Eli might know an mtree-specific way, but if there's a
common feature, like lots of files under /usr/bin that are group xianwen
instead of root, then find(1) could be used to first list what it would
change, allowing the list to be checked by eye, and then correct.
Something like

     find -xdev /usr/bin -group xianwen -ls
     find -xdev /usr/bin -group xianwen -exec chgrp root {} +

https://mywiki.wooledge.org/UsingFind might help if you're not familiar
with find(1).  It has -user and -perm too.

Or you could try and use the output of paccheck(1) to produce a script
to execute, again after checking it by eye.

     sudo -i paccheck --quiet --file-properties |
     awk '
             / permission mismatch / {
                 print "chmod 0" substr($6, 1, length($6)-1), $2
             }
         '




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux