File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,27 @@ fn_check_permissions() {
71
71
echo -en " File:"
72
72
echo -en " ${findnotexecutable} "
73
73
} | column -s $' \t ' -t | tee -a " ${lgsmlog} "
74
- if [ " ${monitorflag} " == 1 ]; then
75
- alert=" permissions"
76
- alert.sh
74
+
75
+ # Attempt to make the files executable
76
+ fn_print_information_nl " Attempting to fix permissions issues"
77
+ fn_script_log_info " Attempting to fix permissions issues"
78
+ echo " ${findnotexecutable} " | xargs chmod +x
79
+
80
+ # Re-check if there are still non-executable files
81
+ findnotexecutable=" $( find " ${modulesdir} " -type f -not -executable) "
82
+ findnotexecutablewc=" $( find " ${modulesdir} " -type f -not -executable | wc -l) "
83
+ if [ " ${findnotexecutablewc} " -ne " 0" ]; then
84
+ fn_print_fail_nl " Failed to resolve permissions issues"
85
+ fn_script_log_fail " Failed to resolve permissions issues"
86
+ if [ " ${monitorflag} " == 1 ]; then
87
+ alert=" permissions"
88
+ alert.sh
89
+ fi
90
+ core_exit.sh
91
+ else
92
+ fn_print_ok_nl " Permissions issues resolved"
93
+ fn_script_log_pass " Permissions issues resolved"
77
94
fi
78
- core_exit.sh
79
95
fi
80
96
fi
81
97
You can’t perform that action at this time.
0 commit comments