Service accounts wont work

What is the problem you are having with rclone? im trying to use my service keys with this project for uploading: https://github.com/BinsonBuzz/unraid_rclone_mount. i get a error when it tried to upload.

What is your rclone version (output from rclone version)

1.53.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

unraid Version: 6.8.3

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here
```[logs](https://pastebin.com/raw/SUH0vPbZ)

You didn't include a config file, but your error is you remote isn't in your config.

2020/10/22 08:00:01 Failed to create file system for "gdrive_upload_vfs:": didn't find section in config file

im sorry sir thats old logs here is my new log just now!

Blockquote: 2020/10/22 16:00:02 DEBUG : Local file system at /mnt/user/local/plex_vfs: deleted 7 directories
2020/10/22 16:00:02 INFO : There was nothing to transfer
2020/10/22 16:00:02 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time: 0.8s

2020/10/22 16:00:02 DEBUG : 7 go routines active
22.10.2020 16:00:02 INFO: Not utilising service accounts.
22.10.2020 16:00:02 INFO: Script complete
Script Finished Oct 22, 2020 16:00.02

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_upload/log.txt

Script Starting Oct 22, 2020 16:30.01

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_upload/log.txt

22.10.2020 16:30:01 INFO: *** Rclone move selected. Files will be moved from /mnt/user/local/plex_vfs for superplex_media_vfs ***
22.10.2020 16:30:01 INFO: *** Starting rclone_upload script for superplex_media_vfs ***
22.10.2020 16:30:01 INFO: Script not running - proceeding.
22.10.2020 16:30:01 INFO: Checking if rclone installed successfully.
22.10.2020 16:30:01 INFO: rclone installed successfully - proceeding with upload.
22.10.2020 16:30:01 INFO: Counter file found for superplex_media_vfs.
22.10.2020 16:30:01 INFO: Adjusted service_account_file for upload remote superplex_media_vfs to sa_gdrive_upload2.json based on counter 2.
22.10.2020 16:30:01 INFO: *** Using rclone move - will add --delete-empty-src-dirs to upload.
2020/10/22 16:30:01 DEBUG : --min-age 15m0s to 2020-10-22 16:15:01.426767995 -0500 CDT m=-899.978107938
2020/10/22 16:30:01 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone/.rclone.conf" "move" "/mnt/user/local/plex_vfs" "superplex_media_vfs:" "--drive-service-account-file=/mnt/user/appdata/other/rclone/service_accounts/sa_gdrive_upload2.json" "--user-agent=superplex_media_vfs" "-vv" "--buffer-size" "512M" "--drive-chunk-size" "512M" "--tpslimit" "8" "--checkers" "8" "--transfers" "4" "--order-by" "modtime,ascending" "--min-age" "15m" "--exclude" "fuse_hidden" "--exclude" "_HIDDEN" "--exclude" ".recycle**" "--exclude" ".Recycle.Bin/**" "--exclude" ".backup~" "--exclude" ".partial~*" "--drive-stop-on-upload-limit" "--bwlimit" "01:00,off 08:00,15M 16:00,12M" "--bind=" "--delete-empty-src-dirs"]
2020/10/22 16:30:01 DEBUG : Creating backend with remote "/mnt/user/local/plex_vfs"
2020/10/22 16:30:01 DEBUG : Using config file from "/boot/config/plugins/rclone/.rclone.conf"
2020/10/22 16:30:01 INFO : Starting bandwidth limiter at 12MBytes/s
2020/10/22 16:30:01 INFO : Starting HTTP transaction limiter: max 8 transactions/s with burst 1
2020/10/22 16:30:01 DEBUG : Creating backend with remote "superplex_media_vfs:"
2020/10/22 16:30:01 DEBUG : Creating backend with remote "superplex:crypt"
2020/10/22 16:30:01 Failed to create file system for "superplex_media_vfs:": failed to make remote "superplex:crypt" to wrap: drive: failed when making oauth client: error opening service account credentials file: open /mnt/user/appdata/other/rclone/service_accounts/sa_gdrive_upload2.json: no such file or directory
22.10.2020 16:30:01 INFO: Created counter_3 for next upload run.
22.10.2020 16:30:01 INFO: Script complete
Script Finished Oct 22, 2020 16:30.01

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_upload/log.txt

The path to your service account isn’t right as that’s the error.

this is my path. im using unraid so animeking is mnt/user/appdata:

You'd have to change your rclone.conf or the config to match the right path you pasted there as that's saying the file doesn't exist.

i thought i did:

@Animosity022 is that correct or should i change the path

I am not sure how to tell what your path should be as you have an image to a share location and the service account file should be local be on the unraid.

If you log into the device, validate, you can find the file using the path and if you can see it, use that. I don't use unraid so I wouldn't be able to offer more than that.

The filename in your rclone config does not match the one in your previous screenshot. It also looks like the directory name is service_accounts in the rclone config and service accounts in the previous screenshot.

i have changed the path and name but still error???



Still wrong in the path. Look closer

so do i need to change all me my service accounts to sa_gdrive_upload.json
im a noob with service accounts so idk?

Remove sa_gdrive.json from your path.

I'm not sure if it's team drive or Google drive but here's what I did for my team drive.

Team drive is owned by user X. What I did was that I manually added all service account as a team drive member (let's call service accounts a, b, c and so on).

Now all that I had to do was that call rclone sync with server side copy and impersonate flag with the service account email and give the json credential path via commandline itself. (No need to configure a new drive in rclone, just use the configured drive for user X with impersonate flag)

I am guessing the same can be done for gdrive also, just add the service accounts to both the folders you wanna copy to/from.

i was told to use this command: rclone sync --drive-impersonate <service_account_email> --drive-service-account-file <path/to/service/account/json/> --drive-server-side-across-configs td1:/ td2:/ but i got this error rclone sync --drive-impersonate <blitz01@animeking-storage.iam.gserviceaccount.com> --drive-service-account-file </mnt/user/appdata/other/rclone/service/sa_gdrive.json> --drive-server-side-across-configs SuperPlex:/ -bash: blitz01@animeking-storage.iam.gserviceaccount.com: No such file or directory
my questions are:

  1. What permissions do they need. I just want to make sure. Also do I have to do that command for each service account or does it work for all service accounts

  2. TD1 and TD2 can I change to my td name instead because I have like 5 tdrives

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.