Skip to content

Commit feb7e12

Browse files
Copilotkurowski
andcommitted
Add temporary workaround and fix umask in Dockerfile
Co-authored-by: kurowski <7466+kurowski@users.noreply.github.com>
1 parent 7b166aa commit feb7e12

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM mcr.microsoft.com/devcontainers/php:8.3
22

33
# Change default umask and add user to web group so we can share write permission on web files
4-
RUN sed -i 's/^UMASK\s*022/UMASK 002/' /etc/login.defs
4+
RUN sed -i 's/^UMASK[[:space:]]*022/UMASK\t\t002/' /etc/login.defs
55
RUN usermod -aG www-data vscode
66

77
# Add glow for formatting command usage output (and because it's just nice)
@@ -57,6 +57,9 @@ RUN sed -i 's/Listen\s*80$/# Listen 80/' /etc/apache2/ports.conf
5757
# Enable Apache modules
5858
RUN a2enmod expires headers rewrite
5959

60+
# Set umask for Apache to ensure group-writable files
61+
RUN echo "umask 002" >> /etc/apache2/envvars
62+
6063
# Install terminus
6164
RUN curl -L https://github.com/pantheon-systems/terminus/releases/latest/download/terminus.phar --output /usr/local/bin/terminus \
6265
&& chmod +x /usr/local/bin/terminus \

local/etc/uceap.d/refresh_content.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function refresh_content() {
1818
# no-same-permissions doesn't seem to work so we fix it here
1919
sudo find web/sites/default/files -type d -exec chmod g+ws {} +
2020
sudo find web/sites/default/files -type f -exec chmod g+w {} +
21+
# Temporary workaround: ensure group write permissions for logging
22+
chmod -R g+w web/sites/default/files
2123

2224
db-rebuild.sh $DATABASE_BACKUP
2325

0 commit comments

Comments
 (0)