Unable to mount bucket subdirectory, but mounting the root works as expected

1,034 views
Skip to first unread message

Ben Ashmead

unread,
Mar 4, 2015, 5:21:54 AM3/4/15
to s3fs-...@googlegroups.com
Hi,

As per the subject, I'm having problems mounting a subdirectory of my S3 bucket. If I mount the bucket with no path specified, everything is good:

[root@new-webcluster-v3 ~]# /usr/bin/s3fs -oallow_other -oendpoint=eu-west-1 marketing-root-cdn tmp/ -f -d
    set_moutpoint_attribute(3497): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
s3fs_init(2680): init
s3fs_check_service(3037): check services.
    CheckBucket(2526): check a bucket.
    RequestPerform(1572): connecting to URL http://marketing-root-cdn.s3.amazonaws.com/
    RequestPerform(1588): HTTP response code 200

I can navigate the various directories, create and read files, all as you'd expect. However, as soon as I add the path into the mix, I get what looks like an authentication error:

[root@new-webcluster-v3 ~]# /usr/bin/s3fs -oallow_other -oendpoint=eu-west-1 marketing-root-cdn:/wp-content/uploads tmp/ -f -d
    set_moutpoint_attribute(3497): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
s3fs_init(2680): init
s3fs_check_service(3037): check services.
    CheckBucket(2526): check a bucket.
    RequestPerform(1572): connecting to URL http://marketing-root-cdn.s3.amazonaws.com/wp-content/uploads/
    RequestPerform(1588): HTTP response code 403
    RequestPerform(1607): HTTP response code 403 was returned, returning EPERM
CheckBucket(2578): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIAJSIJ6YU3HVGKGMGA</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256
20150303T162526Z
20150303/eu-west-1/s3/aws4_request
909822a9310f562dd2af3f5a22c6774bbe1b2e3cc6716669d57ba6f324e33102</StringToSign><SignatureProvided>88c4a46c5619e9282ec01f10220b557284612a6d691a2680d4cf5d20d3125eaa</SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 35 30 33 30 33 54 31 36 32 35 32 36 5a 0a 32 30 31 35 30 33 30 33 2f 65 75 2d 77 65 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 39 30 39 38 32 32 61 39 33 31 30 66 35 36 32 64 64 32 61 66 33 66 35 61 32 32 63 36 37 37 34 62 62 65 31 62 32 65 33 63 63 36 37 31 36 36 36 39 64 35 37 62 61 36 66 33 32 34 65 33 33 31 30 32</StringToSignBytes><CanonicalRequest>GET
/wp-content/uploads/

x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20150303T162526Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</CanonicalRequest><CanonicalRequestBytes>47 45 54 0a 2f 77 70 2d 63 6f 6e 74 65 6e 74 2f 75 70 6c 6f 61 64 73 2f 0a 0a 68 6f 73 74 3a 6d 61 72 6b 65 74 69 6e 67 2d 72 6f 6f 74 2d 63 64 6e 2e 73 33 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 31 35 30 33 30 33 54 31 36 32 35 32 36 5a 0a 0a 68 6f 73 74 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3b 78 2d 61 6d 7a 2d 64 61 74 65 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35</CanonicalRequestBytes><RequestId>77CEF5E6B119910B</RequestId><HostId>af2xec1diGNY/CXCwTPfBH3Cbid0UuvehNQf/WLwQJdVQsWm8K+tMJ6ox2MZVoMvYvdGFqasppQ=</HostId></Error>
s3fs: Failed to access bucket.

The 403 suggests to me that I've fudged the permissions somewhere, but I've made everything in that bucket public, as far as I can tell. Any ideas? I'm running CentOS 7 with fuse 2.9.2, if that makes any difference.

Thanks,

Ben

Takeshi Nakatani

unread,
Mar 21, 2015, 12:42:56 AM3/21/15
to s3fs-...@googlegroups.com
Hi, Ben

I'm sorry for replying late.
This is a bug, and I merged s3fs latest code which is Github master branch(PR#155).

Please try o use it, maybe it works good.
If you find bugs, please post new issue on Github.(https://github.com/s3fs-fuse/s3fs-fuse)

Regards,


2015年3月4日水曜日 19時21分54秒 UTC+9 Ben Ashmead:
Reply all
Reply to author
Forward
0 new messages