From 3484854959bb69d2745d85cb916728e0413e0071 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 18 Oct 2016 14:22:08 +0200 Subject: [PATCH] refresh values for second check --- lgsm/functions/check_permissions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 7cb88ac51..a853a22df 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -106,6 +106,11 @@ fn_check_permissions(){ # Make the executable executable chmod u+x,g+x "${executabledir}/${execname}" # Second check to see if it's been successfully applied + # Get permission numbers on file under the form 775 + execperm="$(stat -c %a "${executabledir}/${execname}")" + # Grab the first and second digit for user and group permission + userexecperm="${execperm:0:1}" + groupexecperm="${execperm:1:1}" if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then # If errors are still found