From 1b28c2fe441a9f09a363f8b7d090da73f7457fe9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 16 Aug 2021 11:40:57 +0200 Subject: [PATCH] fix --- scripts/install | 15 ++------------- scripts/restore | 9 ++------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/scripts/install b/scripts/install index 3c12d01..1545444 100644 --- a/scripts/install +++ b/scripts/install @@ -117,6 +117,8 @@ public_path=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=public_path --value=$public_path mkdir -p $public_path +chown -R $app:www-data $public_path +chmod 755 $public_path #================================================= # NGINX CONFIGURATION @@ -185,19 +187,6 @@ ynh_script_progression --message="Configuring a systemd service..." # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions to app files -chown -R $app:www-data $final_path -chmod -R o-rwx "$final_path" -chown -R $app:www-data $public_path -chmod 755 $public_path - #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/restore b/scripts/restore index 19399f2..66b9de4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -69,15 +69,10 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= -ynh_script_progression --message="Restoring user rights..." - # Restore permissions on app files -chown -R $app:www-data $final_path +chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chmod 755 $public_path +chown -R $app:www-data "$final_path" #================================================= # SPECIFIC RESTORATION