Upload von Objekten nach privates S3 funktioniert nicht

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 „Gefällt mir“

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

2 „Gefällt mir“

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

@mahcr ,

Ich habe das gleiche Problem. Ich kann Backups erstellen, aber keine Bilder hochladen, da „Der Bucket erlaubt keine ACLs“.

Für IAM habe ich die Richtlinie AmazonS3FullAccess angehängt, aber immer noch die gleiche Fehlermeldung.

Haben Sie eine Lösung?

1 „Gefällt mir“

Ich habe das gleiche Problem: Backup funktioniert, aber Upload nicht.

Diese Anleitung ist veraltet:

Diese Anleitung scheint für den CDN-Teil wertvoll zu sein, ist aber keine vollständige Lösung:

Ich habe auch dasselbe Problem. Backup-Upload funktioniert, aber Bild-Upload zeigt “Der Bucket erlaubt keine ACLs”
Und es wurde behoben, indem eine Berechtigung in IAM und zwei Einstellungen im Bucket geändert wurden

Zuerst habe ich die Anleitung bezüglich der IAM-Berechtigung von “s3:HeadBucket” auf “s3:ListBucket” geändert, da Amazon sagte, HeadBucket sei keine gültige Berechtigung

Dann habe ich die Anleitung genau wie auf der Berechtigungsseite im Bucket befolgt

Dann der wichtigste Teil, das Aktivieren von ACLs, es heißt “Objekteigentümerschaft bearbeiten” im Berechtigungs-Tab. Mit aktivierten ACLs und auf “Objektschreiber” gesetzt, funktioniert jetzt alles einwandfrei

Ich hoffe, meine Erfahrung kann Ihnen helfen

3 „Gefällt mir“