Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Commit

Permalink
Changed: fix the php-fpm user/group config for socket communications
Browse files Browse the repository at this point in the history
  • Loading branch information
dlen committed Sep 25, 2020
1 parent a8176ec commit b3e68c2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/centos/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ readonly OS_VERSION_FILE="/etc/centos-release"
readonly FPM_WWW_POOL="/etc/php-fpm.d/www.conf"
readonly FPM_SERVICE="php-fpm"
readonly WWW_USER="nginx"
readonly WWW_GROUP="nginx"
readonly WWW_USER_HOME="/var/lib/nginx"
readonly GNUPG_HOME='/var/lib/nginx/.gnupg'
readonly CRONTAB_DIR='/var/spool/cron/'
Expand Down
1 change: 1 addition & 0 deletions conf/debian/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ readonly OS_VERSION_FILE="/etc/debian_version"
readonly FPM_WWW_POOL="/etc/php/7.3/fpm/pool.d/www.conf"
readonly FPM_SERVICE="php7.3-fpm"
readonly WWW_USER="www-data"
readonly WWW_GROUP="www-data"
readonly WWW_USER_HOME="/home/www-data"
readonly GNUPG_HOME='/home/www-data/.gnupg'
readonly CRONTAB_DIR='/var/spool/cron/crontabs'
1 change: 1 addition & 0 deletions conf/redhat/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ readonly OS_VERSION_FILE="/etc/redhat-release"
readonly FPM_WWW_POOL="/etc/opt/rh/rh-php73/php-fpm.d/www.conf"
readonly FPM_SERVICE="rh-php73-php-fpm"
readonly WWW_USER="nginx"
readonly WWW_GROUP="nginx"
readonly WWW_USER_HOME="/var/opt/rh/rh-nginx116/lib/nginx"
readonly GNUPG_HOME='/var/lib/nginx/.gnupg'
readonly CRONTAB_DIR='/var/spool/cron/'
Expand Down
1 change: 1 addition & 0 deletions conf/ubuntu/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ readonly OS_VERSION_FILE='/etc/debian_version'
readonly FPM_WWW_POOL="/etc/php/7.2/fpm/pool.d/www.conf"
readonly FPM_SERVICE="php7.2-fpm"
readonly WWW_USER="www-data"
readonly WWW_GROUP="www-data"
readonly WWW_USER_HOME="/home/www-data"
readonly GNUPG_HOME='/home/www-data/.gnupg'
readonly CRONTAB_DIR='/var/spool/cron/crontabs'
1 change: 1 addition & 0 deletions lib/helpers/setup_fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ setup_fpm(){

cp "$script_directory/conf/php/www.conf" "$FPM_WWW_POOL"
sed -i s:_WWW_USER_:"$WWW_USER": "$FPM_WWW_POOL"
sed -i s:_WWW_GROUP_:"$WWW_GROUP": "$FPM_WWW_POOL"

enable_service "$FPM_SERVICE"
}

0 comments on commit b3e68c2

Please sign in to comment.