Search code examples
google-cloud-storageblob

Owner information not available from Google Cloud Storage blob


I am using get_blob using the python API. All kinds of information about the blob is available, but owner is set to None. My application needs to know who last updated the file in GCS. Any help would be appreciated!

I tried calling reload with projection set to full, as suggested elsewhere, but it didn’t help. I tried setting acl as well as uniform permissions on the bucket, but it was the same result.

I would be willing to change the bucket permissions to anything (other than making it public) that would allow me to get the file updater/owner information.


Solution

  • In Google Cloud Storage, buckets are owned by the project. Users (IAM principals) are not owners of a bucket. Permissions are granted to users to access a bucket and its objects. The logs record who created a bucket.

    For updates, review Audit Logging. Google records changes to a resource's metadata.

    Usage logs & storage logs