Browse Source

Update check_permissions.sh

pull/820/merge
UltimateByte 9 years ago
parent
commit
62e504a7bc
  1. 6
      lgsm/functions/check_permissions.sh

6
lgsm/functions/check_permissions.sh

@ -13,14 +13,14 @@ conclusionpermissionerror="0"
fn_check_ownership(){ fn_check_ownership(){
# Check script ownership # Check script ownership
if [ ! -U "${scriptfullpath}" ] && [ ! -G "${scriptfullpath}" ]; then if [ ! -O "${scriptfullpath}" ] && [ ! -G "${scriptfullpath}" ]; then
fn_print_fail_nl "Oops ! Permission denied on ${selfname}" fn_print_fail_nl "Oops ! Permission denied on ${selfname}"
echo " * To check allowed user and group run ls -l ${selfname}" echo " * To check allowed user and group run ls -l ${selfname}"
exit 1 exit 1
fi fi
# Check rootdir ownership # Check rootdir ownership
if [ ! -U "${rootdir}" ] && [ ! -G "${rootdir}" ]; then if [ ! -O "${rootdir}" ] && [ ! -G "${rootdir}" ]; then
fn_print_fail_nl "Oops ! Permission denied on ${rootdir}" fn_print_fail_nl "Oops ! Permission denied on ${rootdir}"
echo " * To check allowed user and group run ls -l ${rootdir}" echo " * To check allowed user and group run ls -l ${rootdir}"
exit 1 exit 1
@ -31,7 +31,7 @@ funownfail="0"
if [ -n "${functionsdir}" ]; then if [ -n "${functionsdir}" ]; then
while read -r filename while read -r filename
do do
if [ ! -U "${filename}" ] && [ ! -G "${filename}" ]; then if [ ! -O "${filename}" ] && [ ! -G "${filename}" ]; then
funownfail="0" funownfail="0"
conclusionpermissionerror="1" conclusionpermissionerror="1"
fi fi

Loading…
Cancel
Save