1

I followed this guide to set up an amazon s3 upload procedure for my ember-js application with grunt-s3: http://www.octolabs.com/blogs/octoblog/2014/05/24/deploying-ember-cli-to-amazon-s3-with-grunt/

I noticed that when mounting the s3 filesystem in my ubuntu server, all the files were with permission mode 000.

I want to have the files with permission 644. How can I achieve that?

  • Possible duplicate of [Mount S3 (s3fs) on EC2 with dynamic files - Persistent Public Permission](http://stackoverflow.com/questions/18094543/mount-s3-s3fs-on-ec2-with-dynamic-files-persistent-public-permission) – George Dec 13 '16 at 03:19

2 Answers2

0

In the options section of my grunt.js file I added "x-amz-meta-mode": "33188"

options: {
key: '<%= aws.AWSAccessKeyId %>',
secret: '<%= aws.AWSSecretKey %>',
bucket: '<%= aws.bucket %>',
access: 'public-read',
headers: {
  // Two Year cache policy (1000 * 60 * 60 * 24 * 730)
  "Cache-Control": "max-age=630720000, public",
  "x-amz-meta-mode": "33188",
  "Expires": new Date(Date.now() + 63072000000).toUTCString()
}
0

s3fs 1.85 provides a default permission for objects. You can also work around this by providing the -o mp_umask=027 flag or similar permission.

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19