s3cmd SignatureDoesNotMatch

February 20, 2019 579 views
Object Storage Storage

Problem

When I try to use s3cmd it exits with the following error:

ERROR: S3 error: 403 (SignatureDoesNotMatch)

Attempted Solutions

I have tried regenerating my keys as other similar questions suggested.

Context

I am using s3cmd version 2.0.2.

My s3cmd configuration has the following relevant options:

[default]
access_key = REDACTED
access_token = REDACTED
...
host_base = sfo2.digitaloceanspaces.com
host_bucket = %(bucket)s.sfo2.digitaloceanspaces.com

The s3cmd command I am trying to run is:

s3cmd put foo.txt s3://SPACE/ -c ./s3cmd-cfg

The space I am trying to access is in SFO2.

1 Answer
jarland MOD February 20, 2019
Accepted Answer

Hey friend,

I do not consider myself an expert on s3cmd, and I realize that you already have a configuration file, but can you try setting up the configuration specifically by the steps we've outlined here?

https://www.digitalocean.com/docs/spaces/resources/s3cmd/

It may be some very small difference that is made by using those steps.

Jarland

  • Hi Jarland,

    Thanks for replying.

    I tried using these steps but for some reason the s3cmd --configure dialog was broken on my distribution.

    I ran s3cmd --configure on a different distribution and found that the secret key you get from the Spaces API dashboard should be placed in the secret_key configuration option. Not the access_token option as I did.

Have another answer? Share your knowledge.