From 8a8e11414f6b67c07606eb05cd89826ad0f76ab7 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 25 Dec 2025 16:55:59 +0800 Subject: [PATCH] =?UTF-8?q?chore(docker):=20docker/php/entrypoint.sh=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=BA=94=E7=94=A8=E6=A0=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=EF=BC=8C=E5=88=99=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/php/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index 072704ef2..a55ef76a7 100644 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -8,6 +8,12 @@ APP_ROOT="${PHP_APP_ROOT:-/var/www/html}" echo "使用应用根目录: $APP_ROOT" +# 如果应用根目录不存在,则跳过权限设置 +if [ ! -d "$APP_ROOT" ]; then + echo "❌ 应用根目录:'$APP_ROOT'不存在,跳过权限设置" + exit 1 +fi + # 创建统一的Web组并配置所有用户(最高效的权限管理) configure_web_users() { # 常见Web服务器用户列表