From dd69364d918296c4e7edce4c187e762e86561ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 5 Jan 2024 15:06:01 +0100 Subject: [PATCH] Fix upgrade permissions of data_dir --- manifest.toml | 2 ++ scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2728f83..45cdbfd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,6 +63,8 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.data_dir] subdirs = ["docs"] + owner = "__APP__:rwx" + group = "www-data:rwx" [resources.permissions] main.url = "/" diff --git a/scripts/restore b/scripts/restore index f3bf0b8..06382dc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,8 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory mkdir -p $document_path -chmod -R o-rwx "$html_path" -chown -R $app:www-data "$html_path" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # ADD SSH ACCESS diff --git a/scripts/upgrade b/scripts/upgrade index 7183e4f..dd6f4a9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,8 +82,8 @@ ynh_script_progression --message="Configuring document storage..." --weight=1 ynh_add_config --template="index.html" --destination="$data_dir/index.html" -chmod o-rwx "$data_dir/index.html" -chown "$app:www-data" "$data_dir/index.html" +chmod o-rwx "$data_dir" +chown "$app:www-data" "$data_dir" #================================================= # ADD SSH ACCESS