【问题标题】:File permissions with s3fs and ubuntus3fs 和 ubuntu 的文件权限
【发布时间】:2014-12-20 07:51:15
【问题描述】:

我按照本指南使用 grunt-s3 为我的 ember-js 应用程序设置了 amazon s3 上传过程:http://www.octolabs.com/blogs/octoblog/2014/05/24/deploying-ember-cli-to-amazon-s3-with-grunt/

我注意到在我的 ubuntu 服务器上挂载 s3 文件系统时,所有文件的权限模式都是 000。

我想拥有权限为 644 的文件。我该如何实现?

【问题讨论】:

标签: amazon-s3 s3fs


【解决方案1】:

在我的 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()
}

【讨论】:

    【解决方案2】:

    s3fs 1.85 为对象提供了默认权限。您也可以通过提供-o mp_umask=027 标志或类似权限来解决此问题。

    【讨论】:

      猜你喜欢
      • 2014-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-18
      • 2017-02-09
      • 2014-03-28
      • 2016-04-24
      • 1970-01-01
      相关资源
      最近更新 更多