s3fs:无法访问存储桶

时间:2015-02-06 02:02:13

标签: amazon-s3 fuse s3fs

我创建了一个存储桶,为一个全新的IAM用户添加了完全访问的策略,并尝试将存储桶作为我的存档文件夹安装在我的服务器上。 它只是没有去。我处在一个特殊的云端,是我托管公司唯一一个存储空间很小的垮台。 S3安装的存档存储听起来像是这个想法。

但是当我尝试并遵循所有可用策略时,s3fs无法访问存储桶。我知道这是我,我只是不知道如何。

[root@backoffice s3fs-1.74]# s3fs -f -d -d -o use_cache=/tmp mybucketname /opt/bigarchive
    set_moutpoint_attribute(3291): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40777)
FUSE library version: 2.9.3
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.13
flags=0x0000b07b
max_readahead=0x00020000
s3fs_init(2595): init
s3fs_check_service(2894): check services.
    CheckBucket(2228): check a bucket.
    RequestPerform(1467): connecting to URL http://mybucketname.s3.amazonaws.com/
RequestPerform(1595): ### CURLE_HTTP_RETURNED_ERROR
RequestPerform(1600): HTTP response code =403
s3fs: Failed to access bucket.

我的存储桶政策是:

{
    "Version": "2012-10-17",
    "Id": "mybucketnameS3PolicyId",
    "Statement": [
        {
            "Sid": "IPAllow",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::mybucketname /*",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": "MY.PUBLIC.IP.ADDRESS"
                }
            }
        }
    ]
}

我的IAM政策是:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1423176468000",
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::mybucketname/*",
                "arn:aws:s3:::mybucketname"
            ]
        }
    ]
}

已安装S3fs:

[root@backoffice s3fs-1.74]# s3fs --version
Amazon Simple Storage Service File System 1.74
Copyright (C) 2010 Randy Rizun 
License GPL2: GNU GPL version 2 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

保险丝:

[root@backoffice s3fs-1.74]# pkg-config --modversion fuse
2.9.3

1 个答案:

答案 0 :(得分:0)

你的行动应该是

"Action": "s3:*"

同时确保您的IP地址是S3将看到的IP地址(即外部IP地址)