I need to upload the contents of a local directory into a folder on my google drive account. I need to use a service account to do this (as I do not have physical access to the machine that contains the local directory). The drive folder is shared with the service account email and I have verified that the service account can access the folder (I used the tool gdrive but I stopped using it as it had too many issues). I have tried the commands below where the random string is the drive folder identifier, and then "drivefoldername" is the actual name of the drive folder. I also tried using the --drive-impersonate command with both the service account email and the email of drive folder owner. I have no idea what else to do.
Commands:
rclone copy --update --verbose images/ ImagesUpload:RandomString
rclone copy --update --verbose images/ ImagesUpload:DriveFolderName
rclone copy --drive-impersonate (Tried both service account email and drive folder email owner) --update --verbose images/ ImagesUpload:(I tried both the name of the folder and the identifier)
config:
[ImagesUpload]
type = drive
scope = drive
service_account_file = /home/victor/.gdrive/gdrive.json
team_drive =