From a2d8f8dca06908e2ff27d86212996c37439b3a2d Mon Sep 17 00:00:00 2001 From: Edi Septriyanto Date: Mon, 8 Jul 2024 08:17:08 +0700 Subject: [PATCH] Fix add new user home dir permission --- lib/lemper-create.sh | 2 +- scripts/utils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lemper-create.sh b/lib/lemper-create.sh index 854d0fe..87b83bc 100755 --- a/lib/lemper-create.sh +++ b/lib/lemper-create.sh @@ -1074,7 +1074,7 @@ function init_lemper_create() { run touch "/home/${USERNAME}/logs/php/php${PHP_VERSION}-fpm_slow.log" && \ run touch "/home/${USERNAME}/logs/php/php${PHP_VERSION}-fpm_error.log" && \ run touch "/home/${USERNAME}/logs/php/php${PHP_VERSION}-opcache_error.log" && \ - run chmod 644 "/home/${USERNAME}" && \ + run chmod 755 "/home/${USERNAME}" && \ run chown -hR "${USERNAME}:${USERNAME}" "/home/${USERNAME}/.lemper" "/home/${USERNAME}/cgi-bin" "/home/${USERNAME}/logs" # Restart PHP FPM. diff --git a/scripts/utils.sh b/scripts/utils.sh index 0c36c6f..6f5853b 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -693,7 +693,7 @@ function create_account() { run chmod 700 "/home/${LEMPER_USERNAME}/.ssh" && \ run touch "/home/${LEMPER_USERNAME}/.ssh/authorized_keys" && \ run chmod 600 "/home/${LEMPER_USERNAME}/.ssh/authorized_keys" && \ - run chmod 644 "/home/${LEMPER_USERNAME}" && \ + run chmod 755 "/home/${LEMPER_USERNAME}" && \ run chown -hR "${LEMPER_USERNAME}:${LEMPER_USERNAME}" "/home/${LEMPER_USERNAME}" # Add account credentials to /srv/.htpasswd.