Where are the files in Google Drive?

I had rclone all setup and working fine. Then Google changed something with the credentials and it stopped working.

I've now got it working again, but I don't know where the files are being copied to. If I login to Google drive the files are not being transferred anywhere into that account.

So, how do you find out where the files are going to in Google Drive?

Commands:
ls -l localfolder
rclone -v sync -u --exclude ".*" localfolder gdrive:/shiraz
rclone ls gdrive:/shiraz

They produce the same results, as expected.

But these are different to the "shiraz" folder when I login to Google Drive in the browser. Anything I put in the "shiraz" folder in Google Drive does not appear in "rclone ls gdrive:/shiraz".

Here's my config:
[gdrive]
type = drive
client_id = 123445566675-hidden.apps.googleusercontent.com
client_secret = Vhidden-4Vx
scope = drive
token = {"access_token":"hidden","token_type":"Bearer","refresh_token":"hidden","expiry":"2019-06-07T15:41:24.038863865+10:00"}
service_account_file = /home/hidden/.google-service-account.json

Here's the json file:
{
"type": "service_account",
"project_id": "clever-gear-1234",
"private_key_id": "hidden",
"private_key": "-----BEGIN PRIVATE KEY-----\nhidden\n-----END PRIVATE KEY-----\n",
"client_email": "file-copying@clever-gear-1234.iam.gserviceaccount.co m",
"client_id": "12345656hidden",
"auth_uri": ".../accounts.google.com/o/oauth2/auth",
"token_uri": ".../oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "etc",
"client_x509_cert_url": "etc"
}

I've only dabbled with the service account side of it and I've always used impersonate when testing.

What happens if you break it down a bit and start simple and copy a file up and share the ls output of that copy.

So something like:

[felix@gemini ~]$ rclone copy /etc/hosts GD:
[felix@gemini ~]$ rclone lsl GD:hosts
      243 2019-05-16 11:52:08.698000000 hosts

and share that out and lets make sure it's being copied up.

Thanks for your reply!

Yes, that works, but that's not the problem:
$ rclone copy 123-RCLONETEST.TXT gdrive:/
$ rclone lsl gdrive:/123-RCLONETEST.TXT
6 2019-08-07 14:47:24.341000000 123-RCLONETEST.TXT

My problem is that if I go to Google Drive in my browser, the file is no where to be found:

So, I'm connected to Google Drive, but I have no idea where the files are being stored.

You won't be able to see files created by service accounts in your normal drive unless you share them to the normal drive account.

Thanks for your reply.

OK, so I've been reading about service accounts, and that seems to be the reason.

However, if I share a folder from my Google Drive account to the service account, that folder doesn't appear in the service account using "rclone lsl".

Any ideas?

Try with the --shared-with-me flag

I think the option is "--drive-shared-with-me".

But it makes no difference....

I've created a brand new service account now and it just gets 401 errors.
Response: {
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}

I guess this problem is there is no place to set the scope in the confused maze of Google's credentials area.

On this page: https://rclone.org/drive/
you can see " * In the next field, “One or More API Scopes”, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically."

However, there is no "next field" to enter the scope.