From 120d967a19412610d359a90f0033796e816c9a43 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 May 2021 21:12:52 +0200 Subject: [PATCH] fix nginx access --- manifest.json | 2 +- scripts/install | 3 +++ scripts/restore | 3 +++ scripts/upgrade | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 57f1bc0..2a17a10 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A translation platform using Git and Python", "fr": "Une plateforme de traduction utilisant Git et Python" }, - "version": "4.6.1~ynh1", + "version": "4.6.1~ynh2", "url": "https://weblate.org", "license": "AGPL-3.0", "maintainer": { diff --git a/scripts/install b/scripts/install index ff55bba..ca7f600 100755 --- a/scripts/install +++ b/scripts/install @@ -252,6 +252,9 @@ ynh_add_systemd_config --service="$app-celery" --template="celery-weblate.servic # Set permissions to app files mkdir -p "$final_path/avatar-cache" chown -R "$app": "$final_path" +chown "$app:www-data" "$final_path" +chown -R "$app:www-data" "$final_path/data" + chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/restore b/scripts/restore index 0ef83c8..b590397 100755 --- a/scripts/restore +++ b/scripts/restore @@ -72,6 +72,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell # Restore permissions on app files mkdir -p "$final_path/avatar-cache" chown -R "$app": "$final_path" +chown "$app:www-data" "$final_path" +chown -R "$app:www-data" "$final_path/data" + chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 1ce5d17..a4cd18f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -298,6 +298,9 @@ yunohost service add "$app-celery" --log "/var/log/$app/weblate-celery-w1.log" # Set right permissions for curl installation mkdir -p "$final_path/avatar-cache" chown -R "$app": "$final_path" +chown "$app:www-data" "$final_path" +chown -R "$app:www-data" "$final_path/data" + chmod 750 "$final_path" chmod -R o-rwx "$final_path"