fix: change dir permission.

This commit is contained in:
liqiang-fit2cloud 2025-11-28 14:14:31 +08:00
parent 594b7b27fa
commit cf59cca8bd
2 changed files with 2 additions and 3 deletions

View File

@ -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())

View File

@ -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* && \