Skip to content

Commit 71fdce0

Browse files
authored
build: Sensitive directory permissions (#3120)
1 parent adc5af9 commit 71fdce0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

installer/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ 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 && \
70-
useradd --no-create-home --home /opt/maxkb/app/sandbox sandbox -g root && \
71-
chown -R sandbox:root /opt/maxkb/app/sandbox && \
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 && \
7273
chmod g-x /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/15/bin/* && \
7374
chmod g+x /usr/local/bin/python*
7475

0 commit comments

Comments
 (0)