From 8e3c8a6a2fed992fa35a1dc38b613060341d0f69 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 6 Sep 2023 18:24:51 +0000 Subject: [PATCH] fix: some slight improvements --- old_home.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/old_home.sh b/old_home.sh index 20c5091..2440465 100644 --- a/old_home.sh +++ b/old_home.sh @@ -11,7 +11,6 @@ change_owner_and_permissions() { # Change owner of the directory and its contents chown -R "$username" "$dir" - } iter_dirs(){ @@ -39,14 +38,13 @@ iter_dirs(){ fi # Set permissions to read-only for the owner and not readable by others - #chmod -R 400 "$dir" + # folders have to be executable to be able to read their contents + chmod -R 500 "$dir" # Check if the user exists before changing ownership and permissions if id "$username" &>/dev/null; then change_owner_and_permissions "$dir" "$username" echo "Changed owner and permissions of $dir to $username" - #else - #echo "User $username not found. Leaving $dir owned by root." fi fi done