5

We are using a service account to upload files from a server and it has reached its storage quota limit. All files had been added under a folder created by another user (a @gmail.com account with 100 Gb storage quota) but all files uploaded are owned by the service account.

Note that we don't have real users, we are only using Google drive for storage purposes.

At the moment we are not able to upload any more files using the service account.

Is there a way to

  • Transfer the ownership of all files owned by the service account to the @gmail.com account with 100 Gb storage quota
  • Upload files using the service account but making them owned by the owner of the folder where the file is being uploaded
  • Use the @gmail.com account as a service account

Thanks

pranahata
  • 530
  • 4
  • 18
  • "Use the @gmail.com account as a service account" Yes. See http://stackoverflow.com/questions/19766912/how-do-i-authorise-a-background-web-app-without-user-intervention-canonical – pinoyyid Nov 10 '14 at 11:52

1 Answers1

0

To transfer the ownership of the file, you can rely on the "insert" method from the Permissions resource. You will need the fileId as a required parameter, and fill out the request body with the properties for: Role: [owner], Type: [user], and either one of these id:[userId within drive] or value:[email from the Drive account]. You can find more information in this link: https://developers.google.com/drive/v2/reference/permissions/insert

Rivero
  • 911
  • 1
  • 6
  • 10