Skip to content

Commit

Permalink
Fix add new user permission
Browse files Browse the repository at this point in the history
  • Loading branch information
joglomedia committed Jul 8, 2024
1 parent fc052b2 commit 030caec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/lemper-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1065,15 +1065,16 @@ function init_lemper_create() {
create_fpm_pool_conf "${USERNAME}" "${PHP_VERSION}" > "/etc/php/${PHP_VERSION}/fpm/pool.d/${USERNAME}.conf"

# Create default directories & log files.
run mkdir -p "/home/${USERNAME}/.lemper/tmp"
run mkdir -p "/home/${USERNAME}/.lemper/php/opcache"
run mkdir -p "/home/${USERNAME}/.lemper/php/sessions"
run mkdir -p "/home/${USERNAME}/.lemper/php/wsdlcache"
run mkdir -p "/home/${USERNAME}/cgi-bin"
run mkdir -p "/home/${USERNAME}/logs/php"
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 mkdir -p "/home/${USERNAME}/.lemper/tmp" && \
run mkdir -p "/home/${USERNAME}/.lemper/php/opcache" && \
run mkdir -p "/home/${USERNAME}/.lemper/php/sessions" && \
run mkdir -p "/home/${USERNAME}/.lemper/php/wsdlcache" && \
run mkdir -p "/home/${USERNAME}/cgi-bin" && \
run mkdir -p "/home/${USERNAME}/logs/php" && \
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 chown -hR "${USERNAME}:${USERNAME}" "/home/${USERNAME}/.lemper" "/home/${USERNAME}/cgi-bin" "/home/${USERNAME}/logs"

# Restart PHP FPM.
Expand Down
1 change: 1 addition & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +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 chown -hR "${LEMPER_USERNAME}:${LEMPER_USERNAME}" "/home/${LEMPER_USERNAME}"

# Add account credentials to /srv/.htpasswd.
Expand Down

0 comments on commit 030caec

Please sign in to comment.