-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Accessing restricted groups over s3 produces zero filled array #1504
Comments
Thanks for the clear issue, @samueljackson92. My assumption is you are running into the inverse problem that I had -- fsspec/filesystem_spec#342 -- i.e. some implementations were raising a 403 on chunks leading to application errors. Could you try configuring the exceptions at:
such that you see the behavior you are looking for? It might be that I was looking for things to be too tolerant, but you raise a good point. |
Hi @joshmoore, thanks for your help. I hadn't noticed the options for tweaking exceptions in store = zarr.storage.FSStore(f'mast/{file_name}', fs=s3, exceptions=[BaseException]) to try and just catch anything, but I still get the same assertion failure as above. Do you have any further advice for where this could be being handled? |
Hi @samueljackson92. I think you want the reverse, i.e. you want the PermissionErrors thrown, i.e.:
|
@joshmoore ah sorry, my mistake! Unfortunately, I still see the same issue. I tried both: store = zarr.storage.FSStore(f'mast/{file_name}', fs=s3, exceptions=(KeyError, IOError)) and store = zarr.storage.FSStore(f'mast/{file_name}', fs=s3, exceptions=()) Both of these also just return a zero filled array with no error |
@joshmoore thanks for the signposting! I will investigate the two suggested PRs when I have a little more time and see if they help. |
Zarr version
2.15.0
Numcodecs version
0.11.0
Python Version
3.11.4
Operating System
Linux/Ubuntu
Installation
pip install zarr
Description
Hi,
I am attempting to read a consolidated zarr file with lots of groups remotely from a minio s3 bucket. Everything is working nicely with anonymous access. However, when I try to restrict some groups using the minio ACL tools, Zarr returns a blank zero filled array with no error. I would expect that Zarr/FSpec would throw a "permission denied" or similar error.
For example, I have the following structure, and want to deny anonymous access to group 28412.
I can set the corresponding ACL to deny anonymous access on that particular group in minio. But when I go to try and read the data, instead of getting an error, I get a blank array filled with zeros. I guess Zarr sees the file is not readable and assumes that that it doesn't exist, rather than throw an error.
Steps to reproduce
Here is a simple example to how I am accessing the data from s3. The minio bucket is at
localhost:10101
. If I turn of the ACL in minio then this script runs without errors. However, I would expect an error to be thrown on the penultimate line. Instead I get a blank zero filled array.Additional output
No response
The text was updated successfully, but these errors were encountered: