From defa321bb567454b1082288364363a4e6032e940 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 25 Mar 2021 08:38:38 +0100 Subject: [PATCH] Remove all 'others' permissions in final_path --- scripts/install | 6 +++--- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 4de5fcc..99bcd95 100644 --- a/scripts/install +++ b/scripts/install @@ -96,9 +96,9 @@ ynh_add_fpm_config --usage=medium --footprint=medium --package="$extra_php_depen # Set permissions on app files chown -R $app:www-data $final_path -find $final_path -type f -exec chmod 664 {} \; -find $final_path/bin -type f -exec chmod 775 {} \; -find $final_path -type d -exec chmod 775 {} \; +find $final_path -type f -exec chmod 660 {} \; +find $final_path/bin -type f -exec chmod 770 {} \; +find $final_path -type d -exec chmod 770 {} \; find $final_path -type d -exec chmod +s {} \; #================================================= diff --git a/scripts/restore b/scripts/restore index d41e85a..75cbdf4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,9 +74,9 @@ ynh_system_user_create --username=$app --home_dir=$final_path # Restore permissions on app files chown -R $app:www-data $final_path -find $final_path -type f -exec chmod 664 {} \; -find $final_path/bin -type f -exec chmod 775 {} \; -find $final_path -type d -exec chmod 775 {} \; +find $final_path -type f -exec chmod 660 {} \; +find $final_path/bin -type f -exec chmod 770 {} \; +find $final_path -type d -exec chmod 770 {} \; find $final_path -type d -exec chmod +s {} \; #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ff900c8..a1fc630 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,9 +150,9 @@ fi # Set permissions on app files chown -R $app:www-data $final_path -find $final_path -type f -exec chmod 664 {} \; -find $final_path/bin -type f -exec chmod 775 {} \; -find $final_path -type d -exec chmod 775 {} \; +find $final_path -type f -exec chmod 660 {} \; +find $final_path/bin -type f -exec chmod 770 {} \; +find $final_path -type d -exec chmod 770 {} \; find $final_path -type d -exec chmod +s {} \; #=================================================