From d1dcf418a63592e6eccd8b0cc2b7f63bfea6e437 Mon Sep 17 00:00:00 2001 From: NuwanJ Date: Thu, 24 Oct 2024 13:44:11 +0530 Subject: [PATCH] Permission updates --- scripts/deploy-dev.sh | 4 ++-- scripts/deploy-prod.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/deploy-dev.sh b/scripts/deploy-dev.sh index 9bee738..fe8531d 100644 --- a/scripts/deploy-dev.sh +++ b/scripts/deploy-dev.sh @@ -33,8 +33,8 @@ php artisan view:cache # Not run in dev mode. Must manually done # echo "Running: Setting permissions" # sudo chown -R www-data:www-data ./ -# sudo find ./ -type f -exec chmod 644 {} \; -# sudo find ./ -type d -exec chmod 755 {} \; +# sudo find ./ -type f -exec chmod 751 {} \; +# sudo find ./ -type f -exec chmod 740 {} \ echo "Running: Restarting the queue" php artisan queue:restart diff --git a/scripts/deploy-prod.sh b/scripts/deploy-prod.sh index befa507..848566c 100644 --- a/scripts/deploy-prod.sh +++ b/scripts/deploy-prod.sh @@ -34,11 +34,11 @@ php artisan view:cache echo "Running: Setting permissions" sudo chown -R www-data:www-data ./ -# Set directory permissions to 755 (rwxr-xr-x) -sudo find ./ -type d -exec chmod 755 {} \; +# Set directory permissions to 755 (rwxr-x--x) +sudo find ./ -type d -exec chmod 751 {} \; -# Set file permissions to 644 (rw-r--r--) -sudo find ./ -type f -exec chmod 644 {} \; +# Set file permissions to 644 (rwxr-----) +sudo find ./ -type f -exec chmod 740 {} \; # Ensure storage and cache directories are writable sudo chmod -R 775 ./storage/*