Trying to upload an image from server to server I got:
[ { domain: 'global', reason: 'forbidden', message: 'googlec-storage-object-creator@project-name.iam.gserviceaccount.com does not have storage.objects.delete access to bucket-mybucket/mypicture.jpg.' } ], code: 403,
If the image name is different, it just works. Versioning is suspended, and there was a file with that name, but it was removed.
I even removed the bucket and created it again, and the problem persists.
No error at all if the filename is different from "mypicture.jpg"
Any help about that ? Thanks
If I understood your question correctly, you are trying to upload a file
mypicture.jpgto one of your bucketsbucket-mybucket, using a service account with which you have storage.objectCreator role permissions.The error message that is shown makes me understand that there was already a file
mypicture.jpg, and you are trying to override it, which requires the storage.objects.delete permission, which is not granted in the role I presume you are using.There are several points that can be covered:
mypicture.jpg) and it failed too?gsutil ls -L gs://BUCKET_NAME/FILE_NAMEto see its metadata and check whether there is any remaining thing from that file that may be conflicting and requires the delete permission.gsutil ls -a gs://BUCKET_NAME.gsutilCLI tool, Client Library...?