Adjust permissions on Apache directories for running as an arbitrary user

This commit is contained in:
Tianon Gravi 2018-11-12 15:51:08 -08:00
parent 189782763e
commit e6a51689ce
9 changed files with 36 additions and 18 deletions

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -68,8 +68,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork

View File

@ -26,8 +26,10 @@ RUN set -ex \
; do \
rm -rvf "$dir" \
&& mkdir -p "$dir" \
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
done
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir" \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
&& chmod 1777 "$dir" \
; done
# Apache + PHP requires preforking Apache for best results
RUN a2dismod mpm_event && a2enmod mpm_prefork