-
Notifications
You must be signed in to change notification settings - Fork 62
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
failing to write to S3 bucket without read permission #473
Comments
Ah, interesting. What happens (and/or what do you expect to happen) if the file already exists? We could potentially add Then we will raise |
I'm doing Currently I'm working around this by just doing:
It's not too bad, I can still get some value out of CloudPath, but I need to be aware of the use cases where I may not have read access and use this instead, and that's annoying. |
Makes sense. We're open to taking a PR that implements the approach I suggested above. May need some additional fixes/testing, but should be a good first start. |
OK. It seems to me that implementing this properly according to that suggestion will require some context information in stat() in order to know if an error resulting from lack of read access ought to be translated to NoStatError and then tolerated or bubbled up. I reckon we don't want to end up with translated exceptions for other uses of stat() such as in connection with open("r") - we would still want a ClientError bubbling up with all the cloud-specific details. |
I think it might actually be ok just to raise I believe that the scenarios are either:
Are there other scenarios that seem like they may cause a problem? |
I've got a use case where I'd like to use cloudpathlib to write to a bucket where the user has permissions for put_object but not for get_object.
Currently (0.19) I get an exception when opening as it appears cloudpathlib attempts to refresh the cache:
Is there a way to work around this?
If there isn't but it's something that could be changed, I'd be happy to work on a patch given some direction as to what would be acceptable.
The text was updated successfully, but these errors were encountered: