From cf59cca8bd3343fe76d7e44bae900d2330336e10 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Fri, 28 Nov 2025 14:14:31 +0800 Subject: [PATCH] fix: change dir permission. --- apps/common/utils/tool_code.py | 2 +- installer/Dockerfile-base | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index fac0fe6de..3058861b9 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -74,7 +74,7 @@ class ToolExecutor: with open(sandbox_conf_file_path, "w") as f: f.write(f"SANDBOX_PYTHON_BANNED_HOSTS={banned_hosts}\n") f.write(f"SANDBOX_PYTHON_ALLOW_SUBPROCESS={allow_subprocess}\n") - os.system(f"chmod -R 550 {sandbox_lib_path}") + os.system(f"chmod -R 550 {self.sandbox_path}") def exec_code(self, code_str, keywords): _id = str(uuid.uuid7()) diff --git a/installer/Dockerfile-base b/installer/Dockerfile-base index e766fe0e7..9802ff22a 100644 --- a/installer/Dockerfile-base +++ b/installer/Dockerfile-base @@ -26,9 +26,8 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ chmod 755 /usr/bin/start-*.sh && \ find /etc/ -type f ! -path '/etc/resolv.conf' ! -path '/etc/hosts' | xargs chmod g-rx && \ curl -L --connect-timeout 120 -m 1800 https://resource.fit2cloud.com/maxkb/ffmpeg/get-ffmpeg-linux | sh && \ - mkdir -p /opt/maxkb-app/sandbox/lib && \ + mkdir -p /opt/maxkb-app/sandbox/lib && chmod -R 550 /opt/maxkb-app/sandbox && \ useradd --no-create-home --home /opt/maxkb-app/sandbox sandbox -g root && \ - chown sandbox:root /opt/maxkb-app/sandbox && chmod 550 /opt/maxkb-app/sandbox && \ chmod g-xr /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/17/bin/* && \ chmod g+xr /usr/bin/ld.so && \ chmod g+x /usr/local/bin/python* && \