Closed k0ste closed 1 year ago
Hi, couldn't reproduce it. Here are the steps I have followed:
1) Copy objects without setting acl
with s5cmd
and check one of the files information:
./s5cmd cp "vendor/*" "s3://tmpbd/vendor/"
s3cmd info s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go
Got the result:
s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go (object):
File size: 945502
Last mod: Thu, 31 Aug 2023 06:22:47 GMT
MIME type: text/plain; charset=utf-8
Storage: STANDARD
MD5 sum: 3bbd2e1b04b33a1007929d928ac6a7d9
SSE: AES256
Policy: none
CORS: none
ACL: denizsurmeli: FULL_CONTROL
Flushed the contents, repeating with:
2) Copy the objects with your use case using the following commands:
./s5cmd cp --acl "public-read" "vendor/*" "s3://tmpbd/vendor/"
s3cmd info s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go
Got the result:
s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go (object):
File size: 945502
Last mod: Thu, 31 Aug 2023 06:26:20 GMT
MIME type: text/plain; charset=utf-8
Storage: STANDARD
MD5 sum: 3bbd2e1b04b33a1007929d928ac6a7d9
SSE: AES256
Policy: none
CORS: none
ACL: denizsurmeli: FULL_CONTROL
ACL: *anon*: READ
URL: http://tmpbd.s3.amazonaws.com/vendor/golang.org/x/sys/windows/zerrors_windows.go
If you think that I wasn't following the right steps, we can try to reproduce it together.
Step-by-step with your tests:
√ s5cmd % s5cmd cp "vendor/*" "s3://tmpbd/vendor/"
√ s5cmd % s3cmd info s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go
s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go (object):
File size: 945502
Last mod: Thu, 31 Aug 2023 10:15:22 GMT
MIME type: text/plain; charset=utf-8
Storage: STANDARD
MD5 sum: 3bbd2e1b04b33a1007929d928ac6a7d9
SSE: none
Policy: none
CORS: none
ACL: Konstantin Shalygin: FULL_CONTROL
Flushed the contents, repeating with:
√ s5cmd cp --acl "public-read" "vendor/*" "s3://tmpbd/vendor/"
√ s5cmd % s3cmd info s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go
s3://tmpbd/vendor/golang.org/x/sys/windows/zerrors_windows.go (object):
File size: 945502
Last mod: Thu, 31 Aug 2023 10:17:39 GMT
MIME type: text/plain; charset=utf-8
Storage: STANDARD
MD5 sum: 3bbd2e1b04b33a1007929d928ac6a7d9
SSE: none
Policy: none
CORS: none
ACL: Konstantin Shalygin: FULL_CONTROL
The binary & Kernel:
√ s5cmd % s5cmd version
v2.2.1-be63977
√ s5cmd % uname -a
Darwin Kunteynir.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112 arm64
Hi, sorry for late reply. I have looked at the documentation a bit and couldn't find what might be causing the issue. When you look at the permissions from the AWS console rather than checking with s3cmd
, are the permissions are not granted there too ? There are many moving parts, sorry for the burden.
Hi, sorry for late reply. I have looked at the documentation a bit and couldn't find what might be causing the issue. When you look at the permissions from the AWS console rather than checking with
s3cmd
, are the permissions are not granted there too ? There are many moving parts, sorry for the burden.
This is S3 compatible storage, not the AWS
But yes. When you try to download object with http client the answer will be 403 Forbidded
, and 200
when upload performed via s3cmd
The putObject trace from Darwin
-----------------------------------------------------
DEBUG: Request s3/PutObject Details:
---[ REQUEST POST-SIGN ]-----------------------------
PUT /k0ste/111.txt HTTP/1.1
Host: <host>
User-Agent: aws-sdk-go/1.44.256 (go1.20.7; darwin; arm64) S3Manager
Content-Length: 0
Authorization: AWS4-HMAC-SHA256 Credential=<snip>/20230902/us-east-1/s3/aws4_request, SignedHeaders=content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=6afd65fea9260014f3718783ad0a13cdcd18eebb39721762b4168b1c0a1412f6
Content-Md5: 1B2M2Y8AsgTpgAmY7PhCfg==
Content-Type: text/plain; charset=utf-8
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20230902T134558Z
Accept-Encoding: gzip
And from Linux x86_64
-----------------------------------------------------
DEBUG: Request s3/PutObject Details:
---[ REQUEST POST-SIGN ]-----------------------------
PUT /k0ste/222.txt HTTP/1.1
Host: <host>
User-Agent: aws-sdk-go/1.44.256 (go1.21.0; linux; amd64) S3Manager
Content-Length: 0
Authorization: AWS4-HMAC-SHA256 Credential=<snip>/20230902/us-east-1/s3/aws4_request, SignedHeaders=content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=90327aed756a31c39c906e97680c313c3d434651a59730954254ff2cec02192d
Content-Md5: 1B2M2Y8AsgTpgAmY7PhCfg==
Content-Type: text/plain; charset=utf-8
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20230902T134734Z
Accept-Encoding: gzip
So, the x-amz-acl
header is omitted
s3cmd requst:
DEBUG: Canonical Request:
PUT
/k0ste/111.txt
content-length:0
content-type:inode/x-empty
host:<host>
x-amz-acl:public-read
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20230902T135333Z
x-amz-meta-s3cmd-attrs:atime:1693662336/ctime:1693662336/gid:0/gname:wheel/md5:d41d8cd98f00b204e9800998ecf8427e/mode:33188/mtime:1693662336/uid:501/uname:k0ste
x-amz-storage-class:STANDARD
content-length;content-type;host;x-amz-acl;x-amz-content-sha256;x-amz-date;x-amz-meta-s3cmd-attrs;x-amz-storage-class
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
You are right, s5cmd
omits the header in version v2.2.1-be63977
. Thanks for your contribution, a fix will be prepared ASAP.
Please tag for new bugfix release
https://github.com/peak/s5cmd/releases/tag/v2.2.2, thanks for your contribution again.
Hi, the acl seems was omitted, when I was try
cp
with 2.2.1 versionChecked with s3cmd: