From c02bc58586917b6189afa78353eb2b25941e81ec Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 27 Jan 2020 16:22:56 -0500 Subject: [PATCH] RPM permission verify --- builddep.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builddep.sh b/builddep.sh index 9cfde7ab8..cb8878688 100755 --- a/builddep.sh +++ b/builddep.sh @@ -22,6 +22,7 @@ # Verifies no broken link files in ..../// # Verifies there are no multiple, real (non-link) files with the same name # Verifies all real (non-link) files have a link to it +# Verifies all files have read permission set for all # VERBOSE=1 - Set to 1 to see more VERBOSE output # This script should only be run on RPM based machines @@ -189,6 +190,15 @@ if [[ ${CHECK} -eq 1 ]]; then fi done + # Find files that have read permission missing for "all" + MISSING_PERMISSION=`find $GSA/* -type f -not -perm 644 -a -type f -not -perm 645 -a -type f -not -perm 646 -a -type f -not -perm 647 -a -type f -not -perm 664 -a -type f -not -perm 665 -a -type f -not -perm 666 -a -type f -not -perm 667` + for file in $MISSING_PERMISSION; do + echo "Verify permission for file: " + echo " " $(ls -l $file) + ERROR=1 + done + + if [[ ${ERROR} -eq 1 ]]; then echo -e "\nErrors found verifying files. Rerun this script with CHECK=0 to skip file verification." exit 1