From 8312dc9d16527c66704fc992e0aeef0310680750 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 13 May 2021 15:50:17 +0200 Subject: [PATCH] Fix files permissions --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 61f9753..f767408 100644 --- a/scripts/install +++ b/scripts/install @@ -112,7 +112,7 @@ ynh_add_systemd_config #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R root:$app $final_path chown -R $app $final_path/{cache,feed-icons,lock} #================================================= diff --git a/scripts/restore b/scripts/restore index ff0239b..745361d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,7 +67,7 @@ ynh_system_user_create --username=$app #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R root:$app $final_path chown -R $app $final_path/{cache,feed-icons,lock} #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c0ccfaa..68b9396 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,7 +126,7 @@ then ynh_secure_remove --file="$final_path" mv "$tmpdir" "$final_path" ynh_secure_remove --file="$tmpdir" - + domain_path=https://$domain$path_url ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" @@ -135,7 +135,8 @@ then #================================================= ynh_script_progression --message="Upgrading ttrss database..." --weight=2 - chown -R $app: $final_path + chown -R root:$app $final_path + chown -R $app $final_path/{cache,feed-icons,lock} ynh_exec_as $app php"${phpversion}" ${final_path}/update.php --update-schema fi @@ -154,8 +155,7 @@ ynh_add_systemd_config #================================================= # Set permissions to app files -chown -R root: $final_path -chmod 0755 $final_path +chown -R root:$app $final_path chown -R $app $final_path/{cache,feed-icons,lock} #=================================================