From b2e6d3fac0001e0e8332a8e00e6efed1f9d4edba Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Thu, 30 Apr 2026 18:24:12 +0900 Subject: [PATCH] Fix web-server user --- templates/entrypoints/lib/apache.sh | 3 --- templates/entrypoints/lib/nginx.sh | 2 -- templates/entrypoints/lib/php.sh | 3 --- templates/entrypoints/web-apache-mysql.sh | 3 +++ templates/entrypoints/web-apache-pgsql.sh | 3 +++ templates/entrypoints/web-nginx-mysql.sh | 3 +++ templates/entrypoints/web-nginx-pgsql.sh | 3 +++ 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/templates/entrypoints/lib/apache.sh b/templates/entrypoints/lib/apache.sh index 7f8dcd26..e3bac3fb 100644 --- a/templates/entrypoints/lib/apache.sh +++ b/templates/entrypoints/lib/apache.sh @@ -1,8 +1,5 @@ # shellcheck shell=bash -: "${DAEMON_USER:=apache}" -: "${DAEMON_GROUP:=apache}" - : "${APACHE_RUN_DIR:=/tmp/apache2}" : "${HTTPD_CONF_FILE:=/etc/apache2/httpd.conf}" diff --git a/templates/entrypoints/lib/nginx.sh b/templates/entrypoints/lib/nginx.sh index b80b12d3..54e9e2d5 100644 --- a/templates/entrypoints/lib/nginx.sh +++ b/templates/entrypoints/lib/nginx.sh @@ -1,7 +1,5 @@ # shellcheck shell=bash -: "${DAEMON_USER:=nginx}" - : "${NGINX_CONF_FILE:=/etc/nginx/nginx.conf}" : "${NGINX_CONFD_DIR:=/etc/nginx/http.d}" : "${NGINX_INCLUDES_DIR:=/etc/nginx/includes}" diff --git a/templates/entrypoints/lib/php.sh b/templates/entrypoints/lib/php.sh index 6ed37e7f..14513ab3 100644 --- a/templates/entrypoints/lib/php.sh +++ b/templates/entrypoints/lib/php.sh @@ -1,8 +1,5 @@ # shellcheck shell=bash -: "${DAEMON_USER:=nginx}" -: "${DAEMON_GROUP:=nginx}" - # Internal directory for TLS related files, used when TLS*File specified as plain text values readonly ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal" diff --git a/templates/entrypoints/web-apache-mysql.sh b/templates/entrypoints/web-apache-mysql.sh index a268448f..97092d1d 100644 --- a/templates/entrypoints/web-apache-mysql.sh +++ b/templates/entrypoints/web-apache-mysql.sh @@ -13,6 +13,9 @@ source "${ENTRYPOINT_LIBS}/web.sh" : "${ZBX_SERVER_NAME:=Zabbix docker}" : "${PHP_TZ:=Europe/Riga}" +: "${DAEMON_USER:=apache}" +: "${DAEMON_GROUP:=apache}" + prepare_runtime_commands() { APACHE_BIN="${APACHE_BIN:-/usr/sbin/httpd}" PHP_FPM_BIN="${PHP_FPM_BIN:-/usr/sbin/php-fpm}" diff --git a/templates/entrypoints/web-apache-pgsql.sh b/templates/entrypoints/web-apache-pgsql.sh index bf4da862..063b5e06 100644 --- a/templates/entrypoints/web-apache-pgsql.sh +++ b/templates/entrypoints/web-apache-pgsql.sh @@ -13,6 +13,9 @@ source "${ENTRYPOINT_LIBS}/apache.sh" : "${ZBX_SERVER_NAME:=Zabbix docker}" : "${PHP_TZ:=Europe/Riga}" +: "${DAEMON_USER:=apache}" +: "${DAEMON_GROUP:=apache}" + prepare_runtime_commands() { APACHE_BIN="${APACHE_BIN:-/usr/sbin/httpd}" PHP_FPM_BIN="${PHP_FPM_BIN:-/usr/sbin/php-fpm}" diff --git a/templates/entrypoints/web-nginx-mysql.sh b/templates/entrypoints/web-nginx-mysql.sh index 8233cb05..8d0f7e45 100644 --- a/templates/entrypoints/web-nginx-mysql.sh +++ b/templates/entrypoints/web-nginx-mysql.sh @@ -13,6 +13,9 @@ source "${ENTRYPOINT_LIBS}/nginx.sh" : "${ZBX_SERVER_NAME:=Zabbix docker}" : "${PHP_TZ:=Europe/Riga}" +: "${DAEMON_USER:=nginx}" +: "${DAEMON_GROUP:=nginx}" + prepare_runtime_commands() { NGINX_BIN="${NGINX_BIN:-/usr/sbin/nginx}" PHP_FPM_BIN="${PHP_FPM_BIN:-/usr/sbin/php-fpm}" diff --git a/templates/entrypoints/web-nginx-pgsql.sh b/templates/entrypoints/web-nginx-pgsql.sh index ca47345c..e460cca8 100644 --- a/templates/entrypoints/web-nginx-pgsql.sh +++ b/templates/entrypoints/web-nginx-pgsql.sh @@ -13,6 +13,9 @@ source "${ENTRYPOINT_LIBS}/nginx.sh" : "${ZBX_SERVER_NAME:=Zabbix docker}" : "${PHP_TZ:=Europe/Riga}" +: "${DAEMON_USER:=nginx}" +: "${DAEMON_GROUP:=nginx}" + prepare_runtime_commands() { NGINX_BIN="${NGINX_BIN:-/usr/sbin/nginx}" PHP_FPM_BIN="${PHP_FPM_BIN:-/usr/sbin/php-fpm}"