GDrive - Change Owner

Hello,

We are using a java dev to manage from in GDrive with Oauth2 method and we would like to switch to rclone.
With our Java Dev the token has no expiration so the upload could be done with the account credential in our domain and the quota is assigned to the user.
With rclone the expiration of the oauth2 token is set to 1 hour.

So we tried service account, but the problem is that the owner of the file copied is the service account.

We see 2 options :

  • When using autentication with client id the token is requested with no expiration
  • A command should be available to change the owner.

I hope i’m clear.

Thanks.

That is what google gives you. Rclone should refresh it automatically with the refresh token though so it doesn’t make any difference in practice does it?

Hello Ncw, thanks for you answer.

Is there is way to request a “never expire” token ?

The problem is that when i use SA account, the file is created on GDrive with the service account as owner. And this one has a quota lower than the owner of the target folder.

Additionnaly it seems that rclone do not refresh automatically the token.

After one hour we have :
error reading source directory: couldn’t list directory: googleapi: Error 401: Invalid Credentials, authError

Not as far as I know.

How are you configuring rclone? Just using the normal rclone config method? You should get back a token and a refresh token - rclone refreshes the token with the refresh token indefinitely.

Hello,

I configured it with “rclone config” yes, with interactive method (client_id & client_secret).

What is strange is that this morning (Japan time :slight_smile: ), it works, the token has refresh without change the configuration. Let me do some more tests as i was tested it with the same account on 2 host i maybe did a mistake.

Hello Again,

I confirm that It’s working fine with the last version.

That is good news indeed :smiley: