build: Sensitive directory permissions (#3126)

This commit is contained in:
shaohuzhang1 2025-05-21 16:43:46 +08:00 committed by GitHub
parent 347f4a0b03
commit e5bab10824
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,12 +66,12 @@ RUN chmod 755 /opt/maxkb/app/installer/run-maxkb.sh && \
curl -L --connect-timeout 120 -m 1800 https://resource.fit2cloud.com/maxkb/ffmpeg/get-ffmpeg-linux | sh && \
mkdir -p /opt/maxkb/app/sandbox/python-packages && \
find /opt/maxkb/app -mindepth 1 -not -name 'sandbox' -exec chmod 700 {} + && \
chmod 755 /tmp && chmod 750 /etc &&\
groupadd sandbox &&\
useradd --no-create-home --home /opt/maxkb/app/sandbox sandbox -g sandbox && \
chown -R sandbox:sandbox /opt/maxkb/app/sandbox && \
chmod 755 /tmp && \
useradd --no-create-home --home /opt/maxkb/app/sandbox sandbox -g root && \
chown -R sandbox:root /opt/maxkb/app/sandbox && \
chmod g-x /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/15/bin/* && \
chmod g+x /usr/local/bin/python*
chmod g+x /usr/local/bin/python* && \
chmod g-r /etc
EXPOSE 8080