Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - posix w/awscli version 2.23.0 and up - files written as null bytes #1034

Open
lrm25 opened this issue Jan 17, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@lrm25
Copy link
Contributor

lrm25 commented Jan 17, 2025

Describe the bug
Also see aws/aws-cli#9214. An added checksum verification to awscli somehow results in files being written to the posix gateway as null bytes, the file size being accurate but the bytes themselves obviously not.

This issue can currently be bypassed with the env var AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED (except with s3 cp, see below).

To Reproduce

  1. Download and use a version of awscli greater than 2.23.0.
  2. Start versitygw with a posix gateway, e.g.: ./versitygw --access=******** --secret=******** --region=us-east-1 --iam-dir=/Users/lukemccrone/devel/versitygw/iam --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw
  3. Create a bucket, e.g.: aws --no-verify-ssl s3api create-bucket --bucket versity-gwtest-bucket-one-1
  4. Create a file with non-null bytes, such as a text file, and copy it, e.g.: aws --no-verify-ssl s3api put-object --body {file location} --bucket versity-gwtest-bucket-one-1 --key bucket_file.
  5. Check the file data in /tmp/gw/<bucket name>.

Expected behavior
The file data matches what you added in step 4, rather than just containing null bytes.

Server Version
Version : v1.0.9
Build : 5f95d42
BuildTime: 2025-01-16_05:26:13PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64

@lrm25 lrm25 added the bug Something isn't working label Jan 17, 2025
@lrm25
Copy link
Contributor Author

lrm25 commented Jan 17, 2025

aws/aws-cli#9214 (comment) - as with here, though, s3 cp is not working, even with the env var set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant