Hello Everyone,
Hopefully there is a quick and easy solution for this one. I've writing a script that uses $(rpm -Va | grep '.M') to check for files that differ from what is expected in the RPM database. The main issue I'm finding is that some files returned are different but have tighter permissions than what is expected. I want to be able to specify for rpm to only return those that have weaker permissions than what is expected. I haven't found a rpm native solution to do this, so I'm thinking if I can pull the octal format of the permissions that rpm expects a file to have than I can do some further comparison to see if the actual permissions are adequate. I've been toying with the rpm line below, but no luck yet.
$(rpm -qvl --queryformat :octal $package | grep $file)
Thanks for any available help! -omnivir
EDIT: I found the correct format!
rpm --queryformat '[%{FILEMODES:octal} %{FILENAMES}\n]' -q $package | grep $file
[link][6 comments]