From 7fca84b5c25d86e8581adaa158912ff2a6b21b04 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 1 May 2022 09:39:57 +0200 Subject: [PATCH] fix path --- scripts/install | 2 +- scripts/restore | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index eba6d98..b59f2ec 100644 --- a/scripts/install +++ b/scripts/install @@ -129,7 +129,7 @@ ynh_app_setting_set --app=$app --key=encryptkey --value="$encryptkey" # Copy and set AgenDAV configuration timezone=$(cat /etc/timezone) -caldav_url="https://${domain}${path%/}${caldav_baseurl}" +caldav_url="https://${domain}${path_url%/}${caldav_baseurl}" logdir=/var/log/$app diff --git a/scripts/restore b/scripts/restore index b6cb7d9..a97d684 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,14 +64,16 @@ ynh_restore_file --origin_path="$final_path" # RESTORE USER RIGHTS #================================================= -chown -R root: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" -# Only agendav user should write here +# Only AgenDav user should write here chown -R $app ${final_path}/web/var/cache/{profiler,twig} -# The agendav user should read here, but does not need to write +# The AgenDav user should read here, but does not need to write # Other users should not be able to read as it stores passwords. -chown -R root:$app ${final_path}/web/config/ +chown -R $app ${final_path}/web/config/ chmod -R 750 ${final_path}/web/config/ #=================================================