Rclone lsd ... where is the mistake?

What is the problem you are having with rclone?

I'm trying to create some remotes to use with service accounts. The problem is that I am not able to list the contents of the shared drive from the second remote onwards even though the settings are pretty much the same. The only difference between the remotes is the service_account_file (*.json). I use the same rclone config contents for another Shared Drive and I have no problem listing the contents of the drive.

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

rclone v1.58.1

  • os/version: ubuntu 16.04
  • os/kernel: 4.9.160-armada375 (armv7l)
  • os/type: linux
  • os/arch: arm
  • go/version: go1.17.9
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using?

Shared Drive (Team Drive)

The command you were trying to run

rclone lsd eprise-sa01:
         -1 2022-05-09 23:20:43        -1 backup

rclone lsd eprise-sa02:
2022/06/17 22:00:33 ERROR : : error listing: couldn't list directory: googleapi: Error 404: Shared drive not found: xyxyxyPVA, notFound
2022/06/17 22:00:33 Failed to lsd with 2 errors: last error was: couldn't list directory: googleapi: Error 404: Shared drive not found: xyxyxyPVA, notFound

rclone lsd eprise-sa03:
2022/06/17 22:00:33 ERROR : : error listing: couldn't list directory: googleapi: Error 404:
.
.
.

The rclone config contents with secrets removed.

[eprise-sa01]
type = drive
client_id = xyxyxyomg.apps.googleusercontent.com
client_secret = GOCSPX-xyxyxyxyxyxyxyxyxy
scope = drive
service_account_file = /home/kdantas/sa-json/eprise-sa01.json
team_drive = xyxyxyPVA
root_folder_id =

[eprise-sa02]
type = drive
client_id = xyxyxyomg.apps.googleusercontent.com
client_secret = GOCSPX-xyxyxyxyxyxyxyxyxy
scope = drive
service_account_file = /home/kdantas/sa-json/eprise-sa02.json
team_drive = xyxyxyPVA
root_folder_id =

[eprise-sa03]
.
.
.

This is probably a problem with permissions on the service account.

Google drive often sends 404 errors for permissions problems for security reasons.

But all e-mails of the sa accounts have the same permission. I created a google group with all sa accounts and share this group with all shared drives and gave permission for read/write.
it´s very strange this mistake. Why I have no problem with [eprise-sa01] but I have problem with [eprise-sa02]? This problem is frying my head!!!

The only other thing I can suggest is double check the team drive IDs. I'm sure you've done that already.

Maybe @Animosity022 has an idea as I'm out of expertise as far as service accounts are concerned.

I never used service accounts not shared drives when I used Google Drives as I did not find the need / use case for using a service account since generally, the use case for that was to try to get around service limits.

Are any of those shortcuts or anything else? We did have some issues with shortcuts showing up odd / not working and the latest beta fixed that. It would be worthwhile to share the debug / dump output as we did for those type of issues if you are sure it's not a permissions issue.

-vv --dump bodies would be helpful on the one that does not work.

What happened when you switch the service account file sa01 to 02 for eprise-sa01?

Or using the option instead the config to switch to the SA?

rclone lsd eprise-sa01: --drive-service-account-file /home/kdantas/sa-json/eprise-sa02.json