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