Skip to content

Commit e5bab10

Browse files
authored
build: Sensitive directory permissions (#3126)
1 parent 347f4a0 commit e5bab10

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

installer/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ RUN chmod 755 /opt/maxkb/app/installer/run-maxkb.sh && \
6666
curl -L --connect-timeout 120 -m 1800 https://resource.fit2cloud.com/maxkb/ffmpeg/get-ffmpeg-linux | sh && \
6767
mkdir -p /opt/maxkb/app/sandbox/python-packages && \
6868
find /opt/maxkb/app -mindepth 1 -not -name 'sandbox' -exec chmod 700 {} + && \
69-
chmod 755 /tmp && chmod 750 /etc &&\
70-
groupadd sandbox &&\
71-
useradd --no-create-home --home /opt/maxkb/app/sandbox sandbox -g sandbox && \
72-
chown -R sandbox:sandbox /opt/maxkb/app/sandbox && \
69+
chmod 755 /tmp && \
70+
useradd --no-create-home --home /opt/maxkb/app/sandbox sandbox -g root && \
71+
chown -R sandbox:root /opt/maxkb/app/sandbox && \
7372
chmod g-x /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/15/bin/* && \
74-
chmod g+x /usr/local/bin/python*
73+
chmod g+x /usr/local/bin/python* && \
74+
chmod g-r /etc
7575

7676
EXPOSE 8080
7777

0 commit comments

Comments
 (0)