我已经创建了存储桶,为全新的IAM用户添加了一个全面访问策略,并试图将存储桶安装为我的服务器上的存档文件夹。 它只是不走。我在一个特殊的云端,也是我的托管公司的唯一一个存储空间不足的地方。 S3安装的存档存储听起来像是这个想法。s3fs:无法访问存储桶
但是当我尝试并遵循所有可用策略时,s3fs无法访问存储桶。我知道这是我,我只是不知道如何。
[[email protected] 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安装:
[[email protected] 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.
保险丝,以及:
[[email protected] s3fs-1.74]# pkg-config --modversion fuse 2.9.3
似乎您的安全证书设置有问题。我认为s3fs没有指定缓存大小限制。您可能必须手动检查并删除缓存或自动化它,例如使用cron。 – phobic 2015-02-06 08:25:03
是@phobic,我很了解(s3fs的调试消息返回403 Forbidden)。我正在寻找一些可能的问题。 – 2015-02-06 18:24:31