keep amazon s3 bucket public between uploads

0

I've setup an Amazon CloudFront CDN to point to an Amazon S3 Bucket. It works great, I love how it's streamlined much of my process!

But I have a problem, every time I do a new upload to it, the new files are permission restricted and I have to go through and manually make things public. What is worse is that it doesn't appear that making a top-level directory public fixes this, even when "re-applied" each time.

Is there some way I can tell Amazon S3 "Yes, keep this folder and everything in it public until I say otherwise"?

Ciel

Posted 2016-05-07T12:36:54.433

Reputation: 233

There are no true directory-level permissions in S3, at all. Multi-object operations are exactly that -- the existing objects. How exactly are you uploading the files and then how are you making things public? – Michael - sqlbot – 2016-05-07T15:32:11.343

I am uploading with SmartFTP, and I am setting permissions through the S3 Web Interface. – Ciel – 2016-05-07T15:33:31.050

SmartFTP should have a way to set the ACL on objects when you upload. You want public-read. – Michael - sqlbot – 2016-05-07T19:49:56.223

Thank you for the help. Unfortunately I cannot find such an option, I will keep trying though. What you say about the buckets not having directory level permissions makes sense. If I understand it right, S3 isn't a filesystem - it's more like tables in a database, and the folder is just the index of the table. – Ciel – 2016-05-07T20:18:22.310

Sort of. The index is at the root of the bucket, and the folders don't actually exist. They are derived from the object prefixes, delimited by /. Some tools allow you to "create" a folder, which is just an empty object with a / as the last character in its key (name), a placeholder so you can "select" the folder and upload files "in" it. To upload "foo.jpg" into folder "bar" the actual process behind the scenes is to upload a file named "bar/foo.jpg". The root of the bucket in S3 is empty string, not "/", which is why the object name wouldn't begin with "/" in this example. – Michael - sqlbot – 2016-05-07T21:12:25.647

No answers