# S3 image upload access denied while backups upload working fine

**URL:** <https://meta.discourse.org/t/s3-image-upload-access-denied-while-backups-upload-working-fine/104071>\
**Category:** Self-hosting\
**Tags:** s3\
**Created:** [12 בדצמבר,‏ 2018,‏ 3:02am UTC](https://meta.discourse.org/t/s3-image-upload-access-denied-while-backups-upload-working-fine/104071 "2018-12-12T03:02:28Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![rcfox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rcfox/32/115486_2.png) [@rcfox](https://meta.discourse.org/u/rcfox)\
**Post date:** [23 במרץ,‏ 2020,‏ 8:18pm UTC](https://meta.discourse.org/t/s3-image-upload-access-denied-while-backups-upload-working-fine/104071/22 "2020-03-23T20:18:14Z")

</div>

Hi,  
I ran into a similar issue with a different cause. Uploads to the backup bucket worked, but the uploads bucket didn’t work.

Turns out it was because the uploads bucket was set to block all public access. (Which I think is the default now.) When I tested uploading locally, it worked fine, but Discourse was uploading with “public-read” access, and S3 rejected that. (I would have guessed that S3 would save the “public-read” status on the file, but then reject public access attempts.) I ended up having to hack in extra logging to find out what options were being used for the upload.

Perhaps Discourse could use the [GetPublicAccessBlock](https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetPublicAccessBlock.html) API to check if the bucket is configured properly when setting the “s3 upload bucket” setting?

---

_[View the full topic](https://meta.discourse.org/t/s3-image-upload-access-denied-while-backups-upload-working-fine/104071)._
