Caricare oggetti su S3 privato non funziona

After doing a big research, I’ve not found any guide to upload images to S3 with private ACL.

I’m experiencing a weird behavior where the backups work but not uploadimg of images.

I narrowed the issue down to a problem with ACL of the bucket (I proved that the problem is the ACL since I’m able to upload file using the sdk without specifing the ACL flag). In some cases the “block access to public” permission are set at account level and not bucket level so deactivating the checkbox in the bucket config won’t work.

I noticed that the S3 upload config code was updated, and now the ACL is set based on a param, is there away to pass that config down? discourse/s3_store.rb at tests-passed · discourse/discourse · GitHub

1 Mi Piace

Secure Media Uploads describes how to limit uploads to logged in users. Perhaps that will help?

2 Mi Piace

I tried that, images get uploaded but I get a 500 error in the dashboard with no clue, no logs

@mahcr,

Affronto lo stesso problema. Posso eseguire il backup ma non caricare immagini a causa di “Il bucket non consente ACL”.

Per IAM, ho allegato la policy AmazonS3FullAccess, ma ancora lo stesso errore.

Hai qualche soluzione?

1 Mi Piace

Ho lo stesso problema: il backup funziona ma l’upload no.

Questa guida è obsoleta:

Questa guida sembra essere preziosa per la parte CDN, ma non è la soluzione completa:

Ho riscontrato lo stesso problema. Il caricamento del backup funziona, ma il caricamento delle immagini mostra “Il bucket non consente ACL”.
E si è risolto modificando un’autorizzazione in IAM e due impostazioni nel bucket.

Per prima cosa ho modificato la guida sull’autorizzazione IAM da “s3:HeadBucket” a “s3:ListBucket” perché Amazon ha detto che HeadBucket non è un’autorizzazione valida.

Quindi ho seguito la guida esattamente come nella pagina delle autorizzazioni nel bucket.

Quindi la parte più importante, abilita le ACL, si chiama Edit Object Ownership nella scheda permission, con le ACL abilitate e impostate su object writer, tutto funziona bene ora.

Spero che la mia esperienza possa esserti d’aiuto.

3 Mi Piace