Browse Source
S3: map canned ACL to file permissions and add configurable default file mode (#8886)
S3: map canned ACL to file permissions and add configurable default file mode (#8886)
* S3: map canned ACL to file permissions and add configurable default file mode S3 uploads were hardcoded to 0660 regardless of ACL headers. Now the X-Amz-Acl header maps to Unix file permissions per-object: - public-read, authenticated-read, bucket-owner-read → 0644 - public-read-write → 0666 - private, bucket-owner-full-control → 0660 Also adds -defaultFileMode / -s3.defaultFileMode flag to set a server-wide default when no ACL header is present. Closes #8874 * Address review feedback for S3 file mode feature - Extract hardcoded 0660 to defaultFileMode constant - Change parseDefaultFileMode to return error instead of calling Fatalf - Add -s3.defaultFileMode flag to filer.go and mini.go (was missing) - Add doc comment to S3Options about updating all four flag sites - Add TestResolveFileMode with 10 test cases covering ACL mapping, server default, and priority orderingpull/8890/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 89 additions and 1 deletions
-
1weed/command/filer.go
-
1weed/command/mini.go
-
23weed/command/s3.go
-
1weed/command/server.go
-
25weed/s3api/s3api_object_handlers_put.go
-
38weed/s3api/s3api_object_handlers_put_test.go
-
1weed/s3api/s3api_server.go
Write
Preview
Loading…
Cancel
Save
Reference in new issue