From 48578ae98c5042c20190c541b1d23ed6a106b12a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 10 May 2021 16:02:39 +0200 Subject: [PATCH] change permissions on files and directories --- scripts/install | 12 +++++++++++- scripts/upgrade | 13 +++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index ca5c396..97081a7 100644 --- a/scripts/install +++ b/scripts/install @@ -86,7 +86,17 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc #================================================= chown -R $app:$app $final_path -chmod 755 $final_path +chmod 400 config.dist.php config.local.php index.php sous-domaine.html VERSION +find $final_path/srcipts -type d -exec chmod 500 {} + +find $final_path/srcipts -type f -exec chmod 400 {} + +find $final_path/templates -type d -exec chmod 500 {} + +find $final_path/templates -type f -exec chmod 400 {} + +find $final_path/include -type d -exec chmod 500 {} + +find $final_path/include -type f -exec chmod 400 {} + +find $final_path/data -type d -exec chmod 700 {} + +find $final_path/data -type f -exec chmod 600 {} + +find /var/www/garradin/www -type d -exec chmod 755 {} + +find /var/www/garradin/www -type f -exec chmod 644 {} + #================================================= # SETUP SSOWAT diff --git a/scripts/upgrade b/scripts/upgrade index 5a3d7c1..f69a3fa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -207,8 +207,17 @@ fi # Set permissions on app files chown -R $app:$app $final_path -chmod 755 $final_path - +chmod 400 config.dist.php config.local.php index.php sous-domaine.html VERSION +find $final_path/srcipts -type d -exec chmod 500 {} + +find $final_path/srcipts -type f -exec chmod 400 {} + +find $final_path/templates -type d -exec chmod 500 {} + +find $final_path/templates -type f -exec chmod 400 {} + +find $final_path/include -type d -exec chmod 500 {} + +find $final_path/include -type f -exec chmod 400 {} + +find $final_path/data -type d -exec chmod 700 {} + +find $final_path/data -type f -exec chmod 600 {} + +find /var/www/garradin/www -type d -exec chmod 755 {} + +find /var/www/garradin/www -type f -exec chmod 644 {} + #================================================= # RELOAD NGINX #=================================================