How To Fix DigitalOcean Spaces Access Denied For New Files Uploaded

Digital Ocean’s DO Spaces is a Amazon S3 alike storage space that allows you to store and serve files. By default, permission of files uploaded to your Space buckets will be set as Private.

If you are trying to access these files (be it .txt, .jpg, .png, .pdf, etc) publically via browser, you will be redirected to an error page that looks something like the following:

We encounter the same problem while uploading files via Transmit to our Spaces bucket.

The good news is, it can be solved quite easily with adding the Amazon S3 Access Control List (ACL) request header, x-amz-acl. This header will mark every files uploaded to the bucket as publicly readable.

We can add this header to Transmit so it will send any files with the header. Once done, the files will appear with Permission: Public in the Digital Ocean dashboard.

Here’s how you can add the header:

  1. Launch Transmit, go to Preferences.

  1. Click Cloud Tab.

  1. Under the Extension column, select Default.

  1. Click the + sign with dropdown, select x-amz-acl for Name, and public-read for Value.

  1. Done!

If you’re currently connected to DO Space bucket via Transmit, you might need to disconnect and connect it again. From now on, files uploaded to your Spaces bucket via Transmit will by default be public and accessible via browser. (Source: hongkiat)

Happy learning!

3 Likes