From eb6e1ac6c508557dd46d4fb3cb5e2ed107f90db4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Feb 2023 23:53:13 +0700 Subject: [PATCH] Fix MinIO policy file ownership --- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index ea97294..4fca190 100755 --- a/scripts/install +++ b/scripts/install @@ -195,6 +195,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Setting up MinIO bucket for Outline..." --weight=1 ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" diff --git a/scripts/restore b/scripts/restore index 19b1447..bf8afa0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -124,6 +124,7 @@ mv "$final_path/outlinestorage" "$mc_path/outlinestorage" chown -R minio:www-data "$mc_path/outlinestorage" ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" diff --git a/scripts/upgrade b/scripts/upgrade index 42e4a7e..52215d0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,6 +101,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Updating outlinestorage MinIO bucket access policy..." --weight=1 ynh_add_config --template="../conf/policy.json" --destination="$mc_path/policy.json" +chown minio:www-data "$mc_path/policy.json" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc admin policy add minio outline ./policy.json