@@ -9,23 +9,24 @@ RUN addgroup --gid 1000 wp \
99 && useradd -u 1000 -d /home/wp -g wp -G www-data wp \
1010 && usermod -a -G wp www-data
1111
12+ # TODO: Leaving these here for now in case something goes wrong
1213# All new files should be group-writable
1314# TODO: This is likely wrong. Harmless, but wrong.
14- RUN echo 'umask 002' >> /etc/profile.d/set-umask.sh
15+ # RUN echo 'umask 002' >> /etc/profile.d/set-umask.sh
1516
1617# # Set global umask in /etc/bashrc
1718# RUN echo && echo 'umask 002' >> /etc/bash.bashrc
1819
19- # # Set umask for Apache & PHP
20- # RUN echo >> /etc/apache2/envvars \
21- # && echo '# Set umask so newly created files are group writeable' >> /etc/apache2/envvars \
22- # && echo 'umask 002' >> /etc/apache2/envvars
23-
24- # Set global Umask with pam_umask
20+ # Set global umask with pam_umask
2521RUN echo >> /etc/pam.d/common-session \
2622 && echo '# Set umask so newly created files are group writeable' >> /etc/pam.d/common-session \
2723 && echo 'session optional pam_umask.so umask=002' >> /etc/pam.d/common-session
2824
25+ # Set umask for Apache & PHP so new files are group-writable
26+ RUN echo >> /etc/apache2/envvars \
27+ && echo '# Set umask so newly created files are group writeable' >> /etc/apache2/envvars \
28+ && echo 'umask 002' >> /etc/apache2/envvars
29+
2930# Set Apache ServerName globally to address slowdowns
3031RUN echo "ServerName localhost" > /etc/apache2/conf-available/server-name.conf \
3132 && a2enconf server-name
0 commit comments