laurilehmijoki/jekyll-s3

jekyll-s3 doesn't make files world readable when using a version greater than 0.0.5

spilth opened this issue · 7 comments

I tried upgrading to jekyll-s3 versions 2.0.0 to take advantage of the syncing feature for my blog, but after running jekyll-s3 all my URLs return 403 Forbidden.

I used Transmit to inspect the files on Amazon and see that the Read permission is only set to Owner.

When I use 0.0.5, that permission is set to World, making it accessible to all.

Is there a configuration option that I'm missing to set the files to World Readable?

FYI, I also experience this problem with 0.0.6

You should look into adding a bucket policy to your S3 bucket.

Thanks, I was not aware of Bucket Policies. I used the sample "Granting Permission to an Anonymous User" on Example Cases for Amazon S3 Bucket Policies and it sees to be working

I documented what I did here: http://devlog.spilth.org/2012/12/27/devlog/#m23

README now contains a link to Amazon's official example of setting up an S3 website
(the commit: 314ef7a).

Spilth: the version 0.0.5 used the gem aws-s3 for interacting with the S3 API. In version 0.0.6 I switched it to aws-sdk, which is a gem developed by Amazon. The aws-sdk S3 client does not set any permissions on the uploaded files, whereas the aws-s3 gem might have done otherwise. This probably caused the phenomenon you describe above.

If you find the current setup process too cumbersome, please let me know.

Thanks, Lauri. I think the README addition will be helpful to others.

I was able to solve my problem by using a bucket policy. I think it's a little obtuse to set up but I think that is the fault of Amazon and not jekyll-s3.

If there was a way to programmatically set the Bucket Policy via jekyll-s3 that would certainly be neat.

Thanks Spilth for your feedback.

Here's an issue on programmatically setting up the bucket as a web site: #12.

Version 2.2.0 can programmatically configure the S3 bucket to function as a website. See README for instructions.

Awesome!