s3cmd is not prompting me for an S3 Endpoint. How can I get s3cmd to work with Object Storage?
When I run
s3cmd --configure, I'm not prompted for the Linode Object Storage endpoint. This is causing my access key to fail because s3cmd thinks it belongs to a different provider. How can I fix this?
When you run
s3cmd --configure, you should be receiving a prompt for
S3 Endpoint as shown in our Object Storage guide. However, this feature was added via this GitHub PR in 2016, so not all versions of s3cmd will prompt for
S3 Endpoint when using the
I tested this command on my own Linode running Debian 9, and the version that was installed when I ran
apt-get install s3cmd is an older version of s3cmd. You can check your s3cmd version by running
s3cmd --version. The one installed via apt was 1.6.1; I was not able to locate a more up-to-date version using
s3cmd --configure isn't prompting you to change the endpoint, you'll need to do so manually in your
.s3cfg file. This is most likely located in
/home/$user/.s3cfg if you're running a Linux-based system. There are three values you'll need to update; I've listed them below using
host_base = us-east-1.linodeobjects.com host_bucket = %(bucket)s.us-east-1.linodeobjects.com website_endpoint = http://%(bucket)s.website-us-east-1.linodeobjects.com/
I made these changes in my own .s3cfg file and was able to list my buckets afterwards using
s3cmd ls. If you plan to create buckets in Frankfurt, you'll need to use
I am unsure of how common this issue is, but I dealt with something similar today (Early August 2021) on
s3cmd version 2.1.0. I followed along with the config prompts from s3cmd and this guide from Linode on configuring s3cmd for Linode Object Storage. Upon attempting to test the supplied configuration I got the following error:
Test access with supplied credentials? [Y/n] Please wait, attempting to list all buckets... ERROR: Test failed: 403 (SignatureDoesNotMatch)
I quit out and didn't save the config a few times. After seeing this I decided to go ahead and save it to see what had been written to the config at: /Users/me/.s3cfg. I took a look and everything seemed correct so I gave the tool a shot and it just worked.
❯ s3cmd ls 2021-08-06 17:12 s3://best-bucket-name-ever