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

**URL:** <https://forum.rclone.org/t/cant-get-google-drive-service-accounts-to-work-folders-show-up-empty/46176>\
**Category:** Help and Support\
**Created:** [May 25, 2024, 8:22pm UTC](https://forum.rclone.org/t/cant-get-google-drive-service-accounts-to-work-folders-show-up-empty/46176 "2024-05-25T20:22:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mxqo49wh](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@mxqo49wh](https://forum.rclone.org/u/mxqo49wh)\
**Post date:** [May 25, 2024, 8:22pm UTC](https://forum.rclone.org/t/cant-get-google-drive-service-accounts-to-work-folders-show-up-empty/46176/1 "2024-05-25T20:22:28Z")

</div>

#### 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](https://www.youtube.com/watch?v=t48_r_w64J0) 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.

```auto
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`)

```auto
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.

```auto
[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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![mxqo49wh](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@mxqo49wh](https://forum.rclone.org/u/mxqo49wh)\
**Post date:** [May 25, 2024, 11:30pm UTC](https://forum.rclone.org/t/cant-get-google-drive-service-accounts-to-work-folders-show-up-empty/46176/2 "2024-05-25T23:30:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [May 28, 2024, 11:30pm UTC](https://forum.rclone.org/t/cant-get-google-drive-service-accounts-to-work-folders-show-up-empty/46176/3 "2024-05-28T23:30:54Z")

</div>

Closed on May 28, 2024, 11:30pm UTC

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