Error trying to delete folder on S3 external storage

I have configured an external S3 storage with a key pairs of an user that have full control of the bucket.
All works fine, except that i can’t delete any folder.
I’ve activated the debug log and the response is:
“Exception”:“Sabre\\DAV\\Exception\\Forbidden”

My S3 bucket is located in eu-central-1 zone.

Steps to reproduce

  1. connect S3 external storage
  2. create a folder
  3. try to delete the folder

Expected behaviour

Delete the folder

Actual behaviour

Get an error: Errore durante l’eliminazione del file “Prova”.

Server configuration

Operating system: Ubuntu 18

Web server: Apache

Database: MySQL 5.7.29

PHP version: 7.2.24

ownCloud version: 10.4.0.4

Updated from an older ownCloud or fresh install: Fresh install

Perhaps you don’t have the permission to delete files in your bucket? Double check the security settings in your AWS Console.

Can you also paste the whole exception?

1 Like

I’ve check and i have the right, because if i login to aws console with the same IAM user i can also delete the folder, and anyway i can delete the file also from owncloud, only the folders i can’t delete.
Here the complete exception:
{“reqId”:“gxx3TOFoqbdj7VHcJ72p”,“level”:0,“time”:“2020-04-03T09:53:51+00:00”,“remoteAddr”: “XXXXX”,“user”:“XXXXXX”,“app”:“webdav”,“method”:“DELETE”,“url”:"/remote.php/dav/files/MY_USER/S3-Storage/ale",“message”:“Exception: HTTP/1.1 403 Forbidden: {“Exception”:“Sabre\\DAV\\Exception\\Forbidden”,“Message”:”",“Code”:0,“Trace”:"#0 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Tree.php(183): OCA\\DAV\\Connector\\Sabre\\Directory->delete()\n#1 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(295): Sabre\\DAV\\Tree->delete(‘files\/alessandr…’)\n#2 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(89): Sabre\\DAV\\CorePlugin->httpDelete(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(474): Sabre\\DAV\\Server->emit(‘method:DELETE’, Array)\n#4 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(251): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/apps\/dav\/lib\/Server.php(329): Sabre\\DAV\\Server->start()\n#6 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#7 \/var\/www\/MY_CLOUD_FOLER\/owncloud\/remote.php(165): require_once(’\/var\/www\/cloud…’)\n#8 {main}",“File”:"\/var\/www\/MY_CLOUD_FOLER\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php",“Line”:345}"}

I guess you are using the files_external_s3 app?

Can you confirm that you are still able to delete folders via for example the awscli tool on the server?
aws s3 rm --recursive s3://your_bucket_name/foo/

I’m a little confused why SabreDAV is telling you forbidden, not sure that that is right. Perhaps you don’t have the rights in ownCloud to delete that folder?

1 Like

Yes i’ve try again with another folder:

➜ ~ aws s3 ls s3://cloud-p3
PRE Altra/
PRE Prova/
PRE Test/
PRE delete_test/
➜ ~ aws s3 rm --recursive s3://cloud-p3/delete_test
delete: s3://cloud-p3/delete_test/altra cartella/
delete: s3://cloud-p3/delete_test/
➜ ~ aws s3 ls s3://cloud-p3
PRE Altra/
PRE Prova/
PRE Test/

Hi, do you have some news about this issue?
Thanks

Sorry, I don’t. But there are still a few open questions in my previous post. Perhaps you can answer them, that might get us forward:

1 Like

Yes, i use files_external_s3 app and i have full access to this folder, i use the admin user to create and soon delete a folder on the S3-Storage root folder but i can’t delete.
This is the storage configuration

May i do something more to help you to find what is the problem?

If you can reliably reproduce the issue, meaning you did another fresh install from scratch, you can use docker, and created a new S3 bucket that you add to that new installation and the error persists, you could try opening a ticket in github:

1 Like

just tired myself and get red box meaning some error

this is my log


{“reqId”:“RFjVDsVXyS33kl1cAB84”,“level”:3,“time”:“2020-04-16T19:17:21-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:"/index.php/apps/files_external/globalstorages/1",“message”:“Except$
{“reqId”:“RFjVDsVXyS33kl1cAB84”,“level”:3,“time”:“2020-04-16T19:17:21-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:”/index.php/apps/files_external/globalstorages/1",“message”:“Caused$
{“reqId”:“RFjVDsVXyS33kl1cAB84”,“level”:3,“time”:“2020-04-16T19:17:21-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:”/index.php/apps/files_external/globalstorages/1",“message”:“Except$
{“reqId”:“IVufXhG2S0uBoY1Kj83V”,“level”:3,“time”:“2020-04-16T19:17:31-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:”/index.php/apps/files_external/globalstorages/1",“message”:“Except$
{“reqId”:“IVufXhG2S0uBoY1Kj83V”,“level”:3,“time”:“2020-04-16T19:17:31-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:”/index.php/apps/files_external/globalstorages/1",“message”:“Caused$
{“reqId”:“IVufXhG2S0uBoY1Kj83V”,“level”:3,“time”:“2020-04-16T19:17:31-04:00”,“remoteAddr”:“24.185.167.129”,“user”:“oc1”,“app”:“files_external”,“method”:“PUT”,“url”:”/index.php/apps/files_external/globalstorages/1",“message”:"Except$


1 Like

Hi @chacho,
Thanks for trying to reproduce, however in your paste the lines are clipped.
I assume you used something like nano or another pager that doesn’t wrap the lines automatically to display your log file.
Can you perhaps grep your owncloud log for the request IDs, then ownCloud should show the whole lines, like so:

grep "<request id>" /path/to/owncloud/data/owncloud.log
# It might look something like this:
grep "IVufXhG2S0uBoY1Kj83V" /mnt/data/files/owncloud.log
grep "RFjVDsVXyS33kl1cAB84" /mnt/data/files/owncloud.log
1 Like

thanks i realize my case i cant even connect
my s3 bucker is private but i also tried public . (what should it be )

oc.log (34.2 KB)

1 Like

Have you try to compile the region field? I have had the same problem before fill it

Documentation says its optional I did try region got same issue

For region I tried us-east-2.
May i ask is s3 bucket suppose to be public or private

think now it complains about my key which is correct

{"reqId":"YHsQtKG3so8NKazSFkbC","level":3,"time":"2020-04-17T18:16:24-04:00","remoteAddr":"24.185.167.129","user":"oc1","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/1","message":"Exception: {\"Exception\":\"Aws\\\\S3\\\\Exception\\\\S3Exception\",\"Message\":\"Error executing \\\"CreateBucket\\\" on \\\"https:\\\/\\\/s3.amazonaws.com\\\/%2Fmnt%2Focfiles\\\"; AWS HTTP error: Client error response [url] https:\\\/\\\/s3.amazonaws.com\\\/%2Fmnt%2Focfiles [status code] 403 [reason phrase] Forbidden SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your key and signing method. - <?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<Error><Code>SignatureDoesNotMatch<\\\/Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.<\\\/Message><AWSAccessKeyId>AKIAJAZYPCIIGX6MWC4A<\\\/AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256\\n20200417T221624Z\\n20200417\\\/us-east-1\\\/s3\\\/aws4_request\\nc30ba6d66b074cfbdb686c84b3d8ce35320b20bff96bada546ae26c91f2039f8<\\\/StringToSign><SignatureProvided>875103f18f9ae735bcb905fc27fdad1a4d27c73dd33541872868c12201bd9950<\\\/SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 30 30 34 31 37 54 32 32 31 36 32 34 5a 0a 32 30 32 30 30 34 31 37 2f 75 73 2d 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 63 33 30 62 61 36 64 36 36 62 30 37 34 63 66 62 64 62 36 38 36 63 38 34 62 33 64 38 63 65 33 35 33 32 30 62 32 30 62 66 66 39 36 62 61 64 61 35 34 36 61 65 32 36 63 39 31 66 32 30 33 39 66 38<\\\/StringToSignBytes><CanonicalRequest>PUT\\n\\\/\\\/mnt\\\/ocfiles\\n\\nhost:s3.amazonaws.com\\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\\nx-amz-date:20200417T221624Z\\n\\nhost;x-amz-content-sha256;x-amz-date\\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855<\\\/CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 2f 6d 6e 74 2f 6f 63 66 69 6c 65 73 0a 0a 68 6f 73 74 3a 73 33 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 32 30 30 34 31 37 54 32 32 31 36 32 34 5a 0a 0a 68 6f 73 74 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3b 78 2d 61 6d 7a 2d 64 61 74 65 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35<\\\/CanonicalRequestBytes><RequestId>47494ADCB427B91D<\\\/RequestId><HostId>OKUj9GMq7VVd9NImBHAViuwGSSXjEkmB0AfNX0HgmF0wGpH7b9RCq+mPWHGPll6rVtEAJW2aY+I=<\\\/HostId><\\\/Error>\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php(97): Aws\\\\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\\\\Psr7\\\\Request), Object(Aws\\\\Command), Array)\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(203): Aws\\\\WrappedHttpHandler->Aws\\\\{closure}(Array)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(174): GuzzleHttp\\\\Promise\\\\Promise::callHandler(2, Array, Array)\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/RejectedPromise.php(40): GuzzleHttp\\\\Promise\\\\Promise::GuzzleHttp\\\\Promise\\\\{closure}(Array)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/TaskQueue.php(47): GuzzleHttp\\\\Promise\\\\RejectedPromise::GuzzleHttp\\\\Promise\\\\{closure}()\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(246): GuzzleHttp\\\\Promise\\\\TaskQueue->run(true)\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(223): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitFn()\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(267): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(225): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitList()\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(62): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(58): GuzzleHttp\\\\Promise\\\\Promise->wait()\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(86): Aws\\\\AwsClient->execute(Object(Aws\\\\Command))\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php(609): Aws\\\\AwsClient->__call('createBucket', Array)\\n#13 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php(534): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->getConnection()\\n#14 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(207): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->test(false, true)\\n#15 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(251): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus('OCA\\\\\\\\FilesExtern...', Array, false, true)\\n#16 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(186): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OC\\\\Files\\\\External\\\\StorageConfig), true)\\n#17 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(153): OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update(1, 'ocfiles ', 'files_external_...', 'amazons3::acces...', Array, Array, Array, Array, 100, true)\\n#18 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(85): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#19 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(100): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#20 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Files_Exter...', 'update', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#21 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#22 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/base.php(920): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#23 \\\/var\\\/www\\\/html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php\",\"Line\":195}"}
{"reqId":"YHsQtKG3so8NKazSFkbC","level":3,"time":"2020-04-17T18:16:24-04:00","remoteAddr":"24.185.167.129","user":"oc1","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/1","message":"Caused by: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ClientException\",\"Message\":\"Client error response [url] https:\\\/\\\/s3.amazonaws.com\\\/%2Fmnt%2Focfiles [status code] 403 [reason phrase] Forbidden\",\"Code\":403,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Subscriber\\\/HttpError.php(32): GuzzleHttp\\\\Exception\\\\RequestException::create(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Message\\\\Response))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Event\\\/Emitter.php(108): GuzzleHttp\\\\Subscriber\\\\HttpError->onComplete(Object(GuzzleHttp\\\\Event\\\\CompleteEvent), 'complete')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(91): GuzzleHttp\\\\Event\\\\Emitter->emit('complete', Object(GuzzleHttp\\\\Event\\\\CompleteEvent))\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(134): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/Handler\\\/GuzzleV5\\\/GuzzleHandler.php(62): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/WrappedHttpHandler.php(87): Aws\\\\Handler\\\\GuzzleV5\\\\GuzzleHandler->__invoke(Object(GuzzleHttp\\\\Psr7\\\\Request), Array)\\n#11 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/ClientSideMonitoring\\\/AbstractMonitoringMiddleware.php(126): Aws\\\\WrappedHttpHandler->__invoke(Object(Aws\\\\Command), Object(GuzzleHttp\\\\Psr7\\\\Request))\\n#12 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/S3\\\/PermanentRedirectMiddleware.php(43): Aws\\\\ClientSideMonitoring\\\\AbstractMonitoringMiddleware->__invoke(Object(Aws\\\\Command), Object(GuzzleHttp\\\\Psr7\\\\Request))\\n#13 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/S3\\\/PutObjectUrlMiddleware.php(41): Aws\\\\S3\\\\PermanentRedirectMiddleware->__invoke(Object(Aws\\\\Command), Object(GuzzleHttp\\\\Psr7\\\\Request))\\n#14 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/Middleware.php(126): Aws\\\\S3\\\\PutObjectUrlMiddleware->__invoke(Object(Aws\\\\Command), Object(GuzzleHttp\\\\Psr7\\\\Request))\\n#15 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/FulfilledPromise.php(39): Aws\\\\Middleware::Aws\\\\{closure}(Object(Aws\\\\Credentials\\\\Credentials))\\n#16 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/TaskQueue.php(47): GuzzleHttp\\\\Promise\\\\FulfilledPromise::GuzzleHttp\\\\Promise\\\\{closure}()\\n#17 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(246): GuzzleHttp\\\\Promise\\\\TaskQueue->run(true)\\n#18 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(223): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitFn()\\n#19 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(267): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#20 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(225): GuzzleHttp\\\\Promise\\\\Promise->invokeWaitList()\\n#21 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/guzzlehttp\\\/promises\\\/src\\\/Promise.php(62): GuzzleHttp\\\\Promise\\\\Promise->waitIfPending()\\n#22 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(58): GuzzleHttp\\\\Promise\\\\Promise->wait()\\n#23 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/vendor\\\/aws\\\/aws-sdk-php\\\/src\\\/AwsClientTrait.php(86): Aws\\\\AwsClient->execute(Object(Aws\\\\Command))\\n#24 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php(609): Aws\\\\AwsClient->__call('createBucket', Array)\\n#25 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php(534): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->getConnection()\\n#26 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(207): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->test(false, true)\\n#27 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(251): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus('OCA\\\\\\\\FilesExtern...', Array, false, true)\\n#28 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(186): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OC\\\\Files\\\\External\\\\StorageConfig), true)\\n#29 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(153): OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update(1, 'ocfiles ', 'files_external_...', 'amazons3::acces...', Array, Array, Array, Array, 100, true)\\n#30 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(85): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#31 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(100): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#32 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Files_Exter...', 'update', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#33 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#34 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/base.php(920): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#35 \\\/var\\\/www\\\/html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#36 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":89}"}
{"reqId":"YHsQtKG3so8NKazSFkbC","level":3,"time":"2020-04-17T18:16:24-04:00","remoteAddr":"24.185.167.129","user":"oc1","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/1","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Creation of bucket failed. Error executing \\\"CreateBucket\\\" on \\\"https:\\\/\\\/s3.amazonaws.com\\\/%2Fmnt%2Focfiles\\\"; AWS HTTP error: Client error response [url] https:\\\/\\\/s3.amazonaws.com\\\/%2Fmnt%2Focfiles [status code] 403 [reason phrase] Forbidden SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your key and signing method. - <?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<Error><Code>SignatureDoesNotMatch<\\\/Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.<\\\/Message><AWSAccessKeyId>AKIAJAZYPCIIGX6MWC4A<\\\/AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256\\n20200417T221624Z\\n20200417\\\/us-east-1\\\/s3\\\/aws4_request\\nc30ba6d66b074cfbdb686c84b3d8ce35320b20bff96bada546ae26c91f2039f8<\\\/StringToSign><SignatureProvided>875103f18f9ae735bcb905fc27fdad1a4d27c73dd33541872868c12201bd9950<\\\/SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 30 30 34 31 37 54 32 32 31 36 32 34 5a 0a 32 30 32 30 30 34 31 37 2f 75 73 2d 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 63 33 30 62 61 36 64 36 36 62 30 37 34 63 66 62 64 62 36 38 36 63 38 34 62 33 64 38 63 65 33 35 33 32 30 62 32 30 62 66 66 39 36 62 61 64 61 35 34 36 61 65 32 36 63 39 31 66 32 30 33 39 66 38<\\\/StringToSignBytes><CanonicalRequest>PUT\\n\\\/\\\/mnt\\\/ocfiles\\n\\nhost:s3.amazonaws.com\\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\\nx-amz-date:20200417T221624Z\\n\\nhost;x-amz-content-sha256;x-amz-date\\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855<\\\/CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 2f 6d 6e 74 2f 6f 63 66 69 6c 65 73 0a 0a 68 6f 73 74 3a 73 33 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 32 30 30 34 31 37 54 32 32 31 36 32 34 5a 0a 0a 68 6f 73 74 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3b 78 2d 61 6d 7a 2d 64 61 74 65 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35<\\\/CanonicalRequestBytes><RequestId>47494ADCB427B91D<\\\/RequestId><HostId>OKUj9GMq7VVd9NImBHAViuwGSSXjEkmB0AfNX0HgmF0wGpH7b9RCq+mPWHGPll6rVtEAJW2aY+I=<\\\/HostId><\\\/Error>\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php(534): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->getConnection()\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(207): OCA\\\\FilesExternalS3\\\\Storage\\\\AmazonS3->test(false, true)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(251): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus('OCA\\\\\\\\FilesExtern...', Array, false, true)\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(186): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OC\\\\Files\\\\External\\\\StorageConfig), true)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(153): OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update(1, 'ocfiles ', 'files_external_...', 'amazons3::acces...', Array, Array, Array, Array, 100, true)\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(85): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(100): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Files_Exter...', 'update', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/base.php(920): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/files_external_s3\\\/lib\\\/Storage\\\/AmazonS3.php\",\"Line\":619}"}

any idea what this menans

A refresh token has been used by the client “iOS” to request an access token

"reqId":"469FDEAA-4A43-4E5D-A3F2-0A43F913A676","level":1,"time":"2020-04-17T20:43:32-04:00","remoteAddr":"24.185.167.129","user":"--","app":"oauth2","method":"POST","url":"\/index.php\/apps\/oauth2\/api\/v1\/token","message":"A refresh token has been used by the client \"iOS\" to request an access token."}

so here is what i notice when setting this up .

if i put a bucket that exist it fails so the bucket cant exist .
also documentation says region is option, for me i had to specify the region to get the green check

I’ve try to connect others external s3 storage to try to solve de deletion problem, but i continue to recieve the error “AWS HTTP error: Client error response [url] https:\/\/MYBUCKET.s3.amazonaws.com\/ [status code] 400 [reason phrase] Bad Request AuthorizationHeaderMalformed (client): The authorization header is malformed; the region ‘eu-west-1’ is wrong; expecting 'us-east-1” when i add the external folder.
So now i’ve a bucket connected but i can’t delete folder…and i can’t connect other bucket because i continue to get this errors…
I think i will give up, and i will use only the owncloud main storage

June 2022 : stiil facing the same problem