Monday, March 1, 2021

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:

xml access deniedxml access denied

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.
    step 01step 01
  2. Click Cloud Tab.
    step 02step 02
  3. Under the Extension column, select Default.
    step 03step 03
  4. Click the + sign with dropdown, select x-amz-acl for Name, and public-read for Value.
    step 04step 04
  5. 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.

The post How to Fix DigitalOcean Spaces Access Denied for New Files Uploaded appeared first on Hongkiat.

from Irvine Business Signs https://ift.tt/3kAwgbK
via Irvine Sign Company


How to Fix DigitalOcean Spaces Access Denied for New Files Uploaded was originally posted by Local Sign Company Irvine, Ca. https://goo.gl/4NmUQV https://goo.gl/bQ1zHR http://www.pearltrees.com/anaheimsigns

No comments: