Can't get google drive service accounts to work - folders show up empty

What is the problem you are having with rclone?

I'm so confused about service accounts in google drive. The first two service accounts I've created worked fine - one service account per one folder and they can access them flawlessly. Then the third service account can't access the third folder. There is no error, no quota reached, everything seems fine, but it shows empty. I've spent the next two hours testing different configurations and it only got weirder. I couldn't combine two folders under one service account. Service accounts couldn't access that third folder no matter what.

I've followed this simple guide step-by-step when setting up service accounts.

Any ideas would be very much appreciated. I'm completely clueless right now. Are there some limits on service accounts in terms of folder size/number of accounts? I have only made three service accounts so far.

I've just removed all service accounts and started from scratch. Now it doesn't work at all. It looks like the account got blocked - no new service accounts can't access any of the previously accessible folders.

UPDATE: After six hours into this mess, I've manage to restore access for one service account after switching from "Editor" to "Viewer". But the same "trick" didn't work for another service account on another folder.

Are service accounts the correct way to separate access to folders? Should I create regular users instead? Is it google's fault?

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0
- os/version: arch rolling (64 bit)
- os/kernel: 6.9.1-arch1-2 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone ls remote3: --config ./rclone-2.conf

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[remote1]
type = crypt
remote = remote1-crypt:folder
password = XXX
password2 = XXX

[remote1-crypt]
type = drive
scope = drive
service_account_file = ~/.config/rclone/service-acccount-1.json
root_folder_id = XXX
shared_with_me = true

[remote2]
type = crypt
remote = remote2-crypt:folder
password = XXX
password2 = XXX

[remote2-crypt]
type = drive
scope = drive
service_account_file = ~/.config/rclone/service-acccount-2.json
root_folder_id = XXX
shared_with_me = true

[remote3]
type = drive
scope = drive
service_account_file = ~/.config/rclone/service-acccount-3.json
root_folder_id = XXX
shared_with_me = true

A log from the command that you were trying to run with the -vv flag

2024/05/25 21:21:34 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "ls" "remote3:" "--config" "./rclone-2.conf" "-vv"]
2024/05/25 21:21:34 DEBUG : Creating backend with remote "remote3:"
2024/05/25 21:21:34 DEBUG : Using config file from "/home/user1/.config/rclone/rclone-android.conf"
2024/05/25 21:21:35 DEBUG : 8 go routines active
1 Like

I think I figured it out - sharing folders seems to take a long time, because google drive needs to recursively add access to each file. Piping rclone ls to wc -l after a few minutes started showing more and more files.

This issue took me completely by surprise and took a very long time to solve (I hope that's solved), because the folder I shared prior had thousands of files and while it seemed like it finished, in fact it was still being processed and the next folder that I tried to share despite being very small had to wait for the previous one. Bad luck I guess! But honestly, I will do everything I can to move away from cloud providers and set up a selfhosted file server accessed simply via ssh. This was a total nonsense.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.