From 2eaa3550517d2ea1cdf445c9d3b0fc12eddf2ff9 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 26 Oct 2023 10:56:13 -0400 Subject: [PATCH 1/2] Make the chown nginx to tolerate when a file is set to archive/read. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index babfc8bd8..5c3b0ef38 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ local: generate-secrets echo "Waiting for /var/www/drupal directory to be available..."; \ sleep 2; \ done - docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ && su nginx -s /bin/bash -c "composer install"' + docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ ; su nginx -s /bin/bash -c "composer install"' $(MAKE) remove_standard_profile_references_from_config drupal-database update-settings-php ENVIRONMENT=local docker compose exec -T drupal with-contenv bash -lc "drush si -y islandora_install_profile_demo --account-pass '$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)'" $(MAKE) delete-shortcut-entities && docker compose exec -T drupal with-contenv bash -lc "drush pm:un -y shortcut" @@ -202,7 +202,7 @@ starter_dev: generate-secrets echo "Waiting for /var/www/drupal directory to be available..."; \ sleep 2; \ done - docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ && su nginx -s /bin/bash -c "composer install"' + docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ ; su nginx -s /bin/bash -c "composer install"' $(MAKE) starter-finalize ENVIRONMENT=starter_dev @@ -526,7 +526,12 @@ set-files-owner: $(SRC) ifndef SRC $(error SRC is not set) endif - sudo chown -R $(shell id -u):101 $(SRC) + @echo "Changing ownership of $(SRC) to $(shell id -u):101" + @if sudo chown -R $(shell id -u):101 $(SRC); then \ + echo "Ownership changed successfully."; \ + else \ + echo "Error: Failed to change ownership."; \ + fi # RemovesForces the site uuid to match that in the config_sync_directory so that @@ -589,7 +594,7 @@ starter-init: generate-secrets .PHONY: starter-finalize starter-finalize: - docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx .' + docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx . & echo "Chown Complete"' $(MAKE) drupal-database update-settings-php docker compose exec -T drupal with-contenv bash -lc "drush si -y --existing-config minimal --account-pass '$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)'" docker compose exec -T drupal with-contenv bash -lc "drush -l $(SITE) user:role:add fedoraadmin admin" From 3b3b1b312d3649e35500bf7bba6dae77e33676a3 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 26 Oct 2023 11:03:42 -0400 Subject: [PATCH 2/2] typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5c3b0ef38..142799d55 100644 --- a/Makefile +++ b/Makefile @@ -594,7 +594,7 @@ starter-init: generate-secrets .PHONY: starter-finalize starter-finalize: - docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx . & echo "Chown Complete"' + docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx . ; echo "Chown Complete"' $(MAKE) drupal-database update-settings-php docker compose exec -T drupal with-contenv bash -lc "drush si -y --existing-config minimal --account-pass '$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)'" docker compose exec -T drupal with-contenv bash -lc "drush -l $(SITE) user:role:add fedoraadmin admin"