Skip to content

Commit 8927bd7

Browse files
committed
Added permission handling steps to docker image
1 parent acc4041 commit 8927bd7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.docker/os2web/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
4343
# Adding syn directory.
4444
mkdir -p config/sync; \
4545
# Adjusting ownership
46-
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
46+
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync; \
47+
chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
4748

4849
COPY settings/prod.settings.php /opt/drupal/web/sites/default/
4950
COPY entrypoint.sh /

.docker/os2web/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ else
1919
echo "Deployment skipped"
2020
fi;
2121

22+
# Making sure that all files belong apache web server user.
23+
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
24+
chmod g+s /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
25+
2226
# Starting cron service.
2327
service cron start
2428

0 commit comments

Comments
 (0)