Skip to content

Commit

Permalink
Merge pull request #263 from mivek/fix_permission_tmp_directory
Browse files Browse the repository at this point in the history
Fix permissions on /tmp/modsecurity directory on Apache image
  • Loading branch information
theseion authored Jun 9, 2024
2 parents 24eec99 + ac7882a commit 1f531a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ RUN set -eux; \
mkdir -p /tmp/modsecurity/data; \
mkdir -p /tmp/modsecurity/upload; \
mkdir -p /tmp/modsecurity/tmp; \
chown -R $(awk '/^User/ { print $2;}' /usr/local/apache2/conf/httpd.conf) /tmp/modsecurity; \
mkdir -p /var/log/apache2/; \
ln -s /opt/owasp-crs /etc/modsecurity.d/; \
sed -i -E 's|(Listen) [0-9]+|\1 ${PORT}|' /usr/local/apache2/conf/httpd.conf; \
Expand Down Expand Up @@ -216,6 +215,7 @@ RUN set -eux; \
/var/log/ \
/usr/local/apache2/ \
/etc/modsecurity.d \
/tmp/modsecurity \
/opt/owasp-crs

USER httpd
Expand Down
2 changes: 1 addition & 1 deletion apache/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ RUN set -eux; \
mkdir -p /tmp/modsecurity/data; \
mkdir -p /tmp/modsecurity/upload; \
mkdir -p /tmp/modsecurity/tmp; \
chown -R $(awk '/^User/ { print $2;}' /usr/local/apache2/conf/httpd.conf) /tmp/modsecurity /var/log/apache2; \
chown -R httpd:httpd \
/var/log/ \
/usr/local/apache2/ \
/etc/modsecurity.d \
/tmp/modsecurity \
/opt/owasp-crs

USER httpd
Expand Down

0 comments on commit 1f531a0

Please sign in to comment.