Explorar o código

Changed to serverfiles for now

the rootdir is commonly the home dir. It has been highlighted that
sometimes dirs in the home dir may not belong to the user. I will make
further improvements to permissions soon.
Daniel Gibbs %!s(int64=10) %!d(string=hai) anos
pai
achega
038a49bad0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      lgsm/functions/check_permissions.sh

+ 2 - 2
lgsm/functions/check_permissions.sh

@@ -9,14 +9,14 @@ local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 fn_check_ownership(){
-	if [ $(find "${rootdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then
+	if [ $(find "${serverfiles}" -not -user $(whoami)|wc -l) -ne "0" ]; then
 		fn_print_fail_nl "Permissions issues found"
 		fn_script_log_fatal "Permissions issues found"
 		fn_print_infomation_nl "The current user ($(whoami)) does not have ownership of the following files:"
 		fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:"
 		{
 			echo -e "User\tGroup\tFile\n"
-			find "${rootdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
+			find "${serverfiles}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
 		} | column -s $'\t' -t | tee -a "${scriptlog}"
 		core_exit.sh
 	fi