From a16c9d68e89c7a648ff49cbe12f928928a5d5898 Mon Sep 17 00:00:00 2001 From: Magnus Andersson Date: Wed, 8 May 2024 13:31:22 +0200 Subject: [PATCH] Disable MultipartCopy with user bucket and restore scripts and primary bucket. --- templates/application/config.php.erb | 1 + templates/scriptreceiver/create_bucket.erb.sh | 2 +- templates/scriptreceiver/create_bucket_without_question.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/application/config.php.erb b/templates/application/config.php.erb index 738e4c9..c6429a6 100644 --- a/templates/application/config.php.erb +++ b/templates/application/config.php.erb @@ -97,6 +97,7 @@ $CONFIG = array ( 'region' => 'us-east-1', 'hostname' => '<%= @s3_host %>', 'port' => '', + 'useMultipartCopy' => false, 'objectPrefix' => 'urn:oid:', 'autocreate' => false, 'use_ssl' => true, diff --git a/templates/scriptreceiver/create_bucket.erb.sh b/templates/scriptreceiver/create_bucket.erb.sh index cecf68c..b5b970a 100755 --- a/templates/scriptreceiver/create_bucket.erb.sh +++ b/templates/scriptreceiver/create_bucket.erb.sh @@ -38,7 +38,7 @@ preexisting="$(docker exec -u www-data -i "${container}" php --define apc.enable if [[ -z ${preexisting} ]]; then docker exec -u www-data -i "${container}" php --define apc.enable_cli=1 /var/www/html/occ files_external:create "${user_bucket_name}" \ amazons3 -c bucket="${bucket}" -c key="${key}" -c secret="${secret}" -c hostname="${endpoint}" -c use_ssl=true -c use_path_style=true -c region=us-east-1 \ - amazons3::accesskey --user ${user} + -c useMultipartCopy=false amazons3::accesskey --user ${user} for shareid in $(docker exec -u www-data -i ${container} php --define apc.enable_cli=1 /var/www/html/occ files_external:export ${user} | jq -r '.[].mount_id'); do docker exec -u www-data -i ${container} php --define apc.enable_cli=1 /var/www/html/occ files_external:option ${shareid} enable_sharing true done diff --git a/templates/scriptreceiver/create_bucket_without_question.sh b/templates/scriptreceiver/create_bucket_without_question.sh index 12c53f3..e128360 100644 --- a/templates/scriptreceiver/create_bucket_without_question.sh +++ b/templates/scriptreceiver/create_bucket_without_question.sh @@ -7,7 +7,7 @@ bucket=${4} user=${5} /usr/local/bin/occ files_external:create "${bucket}" \ amazons3 -c bucket="${bucket}" -c key="${key}" -c secret="${secret}" -c hostname="${endpoint}" -c use_ssl=true -c use_path_style=true -c region=us-east-1 \ - amazons3::accesskey --user "${user}" + -c useMultipartCopy=false amazons3::accesskey --user "${user}" for shareid in $(/usr/local/bin/occ files_external:export "${user}" | jq -r '.[].mount_id'); do /usr/local/bin/occ files_external:option "${shareid}" enable_sharing true done