Project

General

Profile

Bug #44987 ยป cmd.txt

yunqing wang, 04/08/2020 03:35 AM

 
$ ./s3cmd setacl --acl-grant=full_control:http://acs.amazonaws.com/groups/global/AllUsers s3://mytest
s3://mytest/: ACL updated

# root @ ceph2 in ~/s3cmd on git:master x [11:00:15]
$ curl -X PUT -T t 10.221.128.14/mytest/test -v
* Trying 10.221.128.14...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 10.221.128.14 (10.221.128.14) port 80 (#0)
> PUT /mytest/test HTTP/1.1
> Host: 10.221.128.14
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 2
> Expect: 100-continue
>
< HTTP/1.1 100 CONTINUE
} [2 bytes data]
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Content-Length: 0
< ETag: "b026324c6904b2a9cb4b88d6d61c81d1"
< Accept-Ranges: bytes
< x-amz-request-id: tx00000000000000000001c-005e8d3e4f-1b367ef-north-3a
< Date: Wed, 08 Apr 2020 03:00:31 GMT
<
100 2 0 0 100 2 0 10 --:--:-- --:--:-- --:--:-- 10
* Connection #0 to host 10.221.128.14 left intact

# root @ ceph2 in ~/s3cmd on git:master x [11:00:31]
$ ./s3cmd setacl --acl-public s3://mytest/test
ERROR: S3 error: 403 (AccessDenied)

# root @ ceph2 in ~/s3cmd on git:master x [11:04:06] C:130
$ curl -X PUT -T t http://s3.ap-northeast-1.amazonaws.com/rgwyest/test -v
* Trying 52.219.0.198...
* Connected to s3.ap-northeast-1.amazonaws.com (52.219.0.198) port 80 (#0)
> PUT /rgwyest/test HTTP/1.1
> Host: s3.ap-northeast-1.amazonaws.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 2
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< x-amz-id-2: jHoW/1IRnEJ4Rb1RbL2aeWojC7AYIhC0v2MpME9uQOU6pvt39ejARZCn/HIJZB8DSo6S1VaVLCw=
< x-amz-request-id: 229E6AA8A819F917
< Date: Wed, 08 Apr 2020 03:04:13 GMT
< ETag: "b026324c6904b2a9cb4b88d6d61c81d1"
< Content-Length: 0
< Server: AmazonS3
<
* Connection #0 to host s3.ap-northeast-1.amazonaws.com left intact

# root @ ceph2 in ~/s3cmd on git:master x [11:04:12]
$ curl -X GET http://s3.ap-northeast-1.amazonaws.com/rgwyest/test -v
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 52.219.4.28...
* Connected to s3.ap-northeast-1.amazonaws.com (52.219.4.28) port 80 (#0)
> GET /rgwyest/test HTTP/1.1
> Host: s3.ap-northeast-1.amazonaws.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< x-amz-id-2: Tpm0VNE83z5C05BblJNDp4Cy6Wm/R1euC7YOwKLO6ICp9ezMwqwk0Dlz6MjKFlv579XAiVGmolo=
< x-amz-request-id: 8B0597B0EABC47A0
< Date: Wed, 08 Apr 2020 03:04:30 GMT
< Last-Modified: Wed, 08 Apr 2020 03:04:13 GMT
< ETag: "b026324c6904b2a9cb4b88d6d61c81d1"
< Accept-Ranges: bytes
< Content-Type: binary/octet-stream
< Content-Length: 2
< Server: AmazonS3
<
1
* Connection #0 to host s3.ap-northeast-1.amazonaws.com left intact

# root @ ceph2 in ~/s3cmd on git:master x [11:04:29]
$ curl -X GET http://s3.ap-northeast-1.amazonaws.com/rgwyest/test\?acl -v
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 52.219.0.104...
* Connected to s3.ap-northeast-1.amazonaws.com (52.219.0.104) port 80 (#0)
> GET /rgwyest/test?acl HTTP/1.1
> Host: s3.ap-northeast-1.amazonaws.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< x-amz-id-2: /YR7FbC2EBjboL4A2Dboo9+T3ydWDneZmIwJWGVWeEbpMU3wNaq2ogjMF367d8J5xEK9lExjQpk=
< x-amz-request-id: 26BB8A31C8A466BC
< Date: Wed, 08 Apr 2020 03:04:41 GMT
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Server: AmazonS3
<
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host s3.ap-northeast-1.amazonaws.com left intact
<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>65a011a29cdf8ec533ec3d1ccaae921c</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>65a011a29cdf8ec533ec3d1ccaae921c</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>#

# root @ ceph2 in ~/s3cmd on git:master x [11:04:40]
$ curl -X PUT -T t http://s3.ap-northeast-1.amazonaws.com/rgwyest/test -v

# root @ ceph2 in ~/s3cmd on git:master x [11:04:46] C:1
$ curl -X GET 10.221.128.14/mytest/test\?acl -v
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 10.221.128.14...
* Connected to 10.221.128.14 (10.221.128.14) port 80 (#0)
> GET /mytest/test?acl HTTP/1.1
> Host: 10.221.128.14
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< x-amz-request-id: tx00000000000000000001f-005e8d3f62-1b367ef-north-3a
< Content-Type: application/xml
< Content-Length: 369
< Date: Wed, 08 Apr 2020 03:05:06 GMT
<
* Connection #0 to host 10.221.128.14 left intact
<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>anonymous</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>anonymous</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>#
    (1-1/1)