Object Storage default permission

Hi, I created a static website with an Object Storage bucket. but the default permission of the upload files is private. That makes the static website unavailable from the public. How could I make my upload static website files' acl are automatically set to public read?

6 Replies

Thank you for your quick help!

My static website has hundreds of files. Do I have to set their acl individually? Is there a command I can set every file's Acl to public after upload them?

I have this similar problem, and setting the bucket level ACL to "public" doesn't seem to have effect on files uploaded to that object afterwards. They're all still set to "private" at the file level, even though the bucket is set to "public".

I've tried both bucket policies and ACLs and I've yet to figure out how to do this. Basically, I'm looking for how to either set the bucket to be default public-read for all objects now or in the future. Or, to be able to upload files to this programatically just like the command s3cmd put example.txt s3://my-example-bucket -P does, where it sets the object to "public" by default.

How does one set a bucket to have all objects put into it in the future have a default policy of public read?

I am also having this issue.

How does one set a bucket to have all objects put into it in the future have a default policy of public read?

I’m not sure this is possible as it creates an easy route for data breaches to happen without adequate knowledge (AWS S3 suffered plenty of high profile ones.)

There are still ways to accomplish what you need, depending on your tooling. For example: rclone has an option when you create a config to specify a default ACL, so any files it uploads will have this ACL set by default.

To immediately sort your current files, you could download the contents of the bucket locally, empty the bucket, then re-upload with the correct ACL (in Rclone this would be using the “--s3-acl=public-read” option.)

@hesperidean3: your answer is doesn't solve the problem.
Thing people want is change default permission for upload files to public and look like no way to do that.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct