diff options
-rw-r--r-- | cron-sh/functions.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh index 43d0820..40fbcab 100644 --- a/cron-sh/functions.sh +++ b/cron-sh/functions.sh @@ -42,6 +42,8 @@ Diffcheck() { YESTERDAY="$2" DAY_DIFF="$3" MESSAGE="$4" + # give the proper permission to files + msecperms -q -e "$TODAY" "$YESTERDAY" if [[ -f ${YESTERDAY} ]]; then if ! diff -u ${YESTERDAY} ${TODAY} > ${DAY_DIFF}; then printf "\nSecurity Warning: change in $MESSAGE found :\n" >> ${DIFF} @@ -52,6 +54,7 @@ Diffcheck() { printf "\t\t- Removed $MESSAGE : ${file}\n" done >> ${DIFF} fi + msecperms -q -e "$DAY_DIFF" fi } |