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

GCP - StreamWrapper issues. #628

Open
stephenheron opened this issue Apr 24, 2023 · 0 comments
Open

GCP - StreamWrapper issues. #628

stephenheron opened this issue Apr 24, 2023 · 0 comments
Labels

Comments

@stephenheron
Copy link

Hello!

We noticed an issue with using Google Cloud Storage and the 'StreamWrapper'. When new files were created using the StreamWrapper method, the permissions of the new files were set to ‘Private’ rather than ‘Public’.

After quite a while investigating, I think I know what the issue is.

If we look in the S3 wrapper, at the stream_flush function, it appears to handle the permissions by using ‘stream_context_set_option’ which the StreamWapper uses internally to get the ACL.

The GCP wrapper doesn’t seem to have anything similar. I used the S3 wrapper as a basis but added the code to the register function and I also had to change the option from ‘ACL’ to ‘predefinedAcl’.

Updated code can be found here: https://gist.github.com/stephenheron/c4c775f11a1fbe19825139e041729cf7

I was going to open a pull request, but it seems like you don’t accept them in this repo.

Not quite sure if it’s the right approach but it’s my best guess.

Thanks,
Stephen

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

No branches or pull requests

1 participant