我按照本指南使用 grunt-s3 为我的 ember-js 应用程序设置了亚马逊 s3 上传程序:http ://www.octolabs.com/blogs/octoblog/2014/05/24/deploying-ember-cli-to -amazon-s3-with-grunt/
我注意到在我的 ubuntu 服务器上挂载 s3 文件系统时,所有文件的权限模式都是 000。
我想拥有权限为 644 的文件。我该如何实现?
我按照本指南使用 grunt-s3 为我的 ember-js 应用程序设置了亚马逊 s3 上传程序:http ://www.octolabs.com/blogs/octoblog/2014/05/24/deploying-ember-cli-to -amazon-s3-with-grunt/
我注意到在我的 ubuntu 服务器上挂载 s3 文件系统时,所有文件的权限模式都是 000。
我想拥有权限为 644 的文件。我该如何实现?
在我的 grunt.js 文件的选项部分,我添加了 "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()
}
s3fs 1.85 为对象提供了默认权限。您也可以通过提供-o mp_umask=027
标志或类似权限来解决此问题。