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

Issue creating a directory in AWS S3 with ACLs disabled #1787

Closed
jhauserdev opened this issue Apr 26, 2024 · 1 comment
Closed

Issue creating a directory in AWS S3 with ACLs disabled #1787

jhauserdev opened this issue Apr 26, 2024 · 1 comment

Comments

@jhauserdev
Copy link

Bug Report

Q A
Flysystem Version 3.27.0
Adapter Name flysystem-aws-s3-v3
Adapter version 3.27.0

Summary

Receiving the following error when trying to create a directory in S3 bucket with ACLs disabled - AWS Recommended.

AccessControlListNotSupported - The bucket does not allow ACLs

Lines 250-251 of AwsS3V3Adapter.php seem to be the cause.

$defaultVisibility = $config->get(Config::OPTION_DIRECTORY_VISIBILITY, $this->visibility->defaultForDirectories()); $config = $config->withDefaults([Config::OPTION_VISIBILITY => $defaultVisibility]);

Removing them allows the directory to be created

How to reproduce

Create a bucket in S3 with ACLs disabled and try to create a directory using the Adapter.

@jhauserdev
Copy link
Author

Found after creating this bug that it can be resolved by adding

'options' => [ 'ACL' => '' ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant