Files uploaded to Google Cloud Storage not showing properly

So i had a project in firebase with Storage enabled. I went to Google Cloud Storage, enabled all necessary options and created new remote to upload my files from my local folder to Cloud Storage.

All was good, i was able to connect to my bucket and upload some images. They appeared in Google Cloud Console and in Firebase Console. But the problem was that i couldn’t get the DOWNLOAD URL of that files (which i can get when i upload files to cloud storage in normal way)

Also when i click on a file that is uploaded from console (web interface) i can see it or download it, but with files uploaded from rclone i get 403 error forbidden

When you set up the remote what did you choose for the status of new objects created with rclone?

It sounds like you need them to be public but the default is private

Access Control List for new objects.
Choose a number from below, or type in your own value
 1 / Object owner gets OWNER access, and all Authenticated Users get READER access.
   \ "authenticatedRead"
 2 / Object owner gets OWNER access, and project team owners get OWNER access.
   \ "bucketOwnerFullControl"
 3 / Object owner gets OWNER access, and project team owners get READER access.
   \ "bucketOwnerRead"
 4 / Object owner gets OWNER access [default if left blank].
   \ "private"
 5 / Object owner gets OWNER access, and project team members get access according to their roles.
   \ "projectPrivate"
 6 / Object owner gets OWNER access, and all Users get READER access.
   \ "publicRead"
object_acl> 6

Hey @ncw . Thanks for quick response. Actually yes, it was set to default and yes after changing it to 6 (publicRead) i could see, move or download files from cloud storage console.

When i try to download that uploaded file from firebase i get this error

Firebase Storage: User is not authenticated, please authenticate using Firebase Authentication and try again.

My firebase rules are set that anyone can read and write

service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}

Again when i upload a photo from console web interface that photo appears in firebase normally, i can see it, downlaod it. But when doing this with rclone, i can see that file is there , in firebase, but i can’t download or view it.

I’m afraid I don’t know anything about Firebase :frowning: It sounds like rclone is uploading using a different user to the one firebase is expecting - is that possible? Can you get rclone to upload as the same user as firebase?

Hey @ncw I contacted to Firebase support team to see if there is something i can do with Firebase. Usually all firebase projects are standard GCP projects so i thought if i will access the storage associated with that project, i can so easily work with firebase storage(which in fact is the same GCP Storage).

I will try to create users with different permissions to see how’s that working. I’ll post here if i’ll get answer from Firebase Team

1 Like

Hey @ncw so the issue was solved with changing “object_alc” from publicRead to bucketOwnerFullControl

Glad you got it sorted! Sorry I couldn’t be more help.