Error during Google Drive cloud sync

ronaldnutter

Cadet
Joined
Jul 18, 2020
Messages
9
I am trying to download/pull what is on my Google Drive account. I am getting this error -
2020/08/12 00:24:28 ERROR : Attempt 3/3 failed with 25 errors and: failed to open source object: open file failed: Use the --drive-acknowledge-abuse flag to download this file: googleapi: Error 403: This file has been identified as malware or spam and cannot be downloaded., cannotDownloadAbusiveFile

The file in question in an android .apk file. This is a file I uploaded from what was on my phone, so dont know why this is getting flagged when I try to download.
where can I put the cli option specified in the error so I can get the files it wont let me download ?

Thanks
Ron
 

openwinz

Cadet
Joined
Aug 22, 2020
Messages
6
I am having the same issue with password protected Zip files that contain .DLL, .EXE files. I know it is a feature within Google Drive to prompt when it is unable to perform a malware check. Would be helpful to have a checkbox to turn this on or off maybe with the credential or Cloud Sync task. I am running TrueNas 12 Beta2.
 

rsammas

Cadet
Joined
Sep 2, 2020
Messages
1
This is something I am experiencing as well, running FreeNAS 11.3-U4.1. I can provide some insight for anyone else experiencing this issue.
--drive-acknowledge-abuse is an rclone flag, it seems that FreeNAS leverages rclone for the cloud sync feature (which is the best way IMO). The best workaround for this would be to manually configure an rclone sync task with the mentioned flag. I know, this is a bit more advanced than checking a box or having an area for rsync flags in the GUI, but its probably the only workaround.

I have not had time to implement yet, but I will post how to set up rsync for this when I get it working. Stay tuned folks!
 

hardj0nn

Cadet
Joined
Oct 3, 2020
Messages
1
I'm using TrueNas Core
this is my workaround -- do not do it if you don't understand what are doing, but it's quite safe though

I've changed this file a bit in order to have this flag in place -- waiting for the official fix
/usr/local/lib/python3.8/site-packages/middlewared/plugins/cloud_sync.py

probably not all the changes are necessary, anyway look for async with RcloneConfig (line 139 in my case)

add the flag into the args array, should look like this
args = [
"/usr/local/bin/rclone",
"--config", config.config_path,
"-v",
"--stats", "1s",
"--drive-acknowledge-abuse",
]


then look for all the entrance of "--config" and insert the flag before

line 551
proc = await run(["rclone", "--drive-acknowledge-abuse", "--config", config.config_path, "lsjson", "remote:"],

line 1011 (the same as above)
proc = await run(["rclone", "--drive-acknowledge-abuse", "--config", config.config_path, "lsjson", "remote:" + path],

line 1019
proc = await run((["rclone", "--drive-acknowledge-abuse", "--config", config.config_path, "cryptdecode", "encrypted:"] +

then I had to restart my NAS since all the middlewares are loading during the boot
you're good to go now
 

Fire-Dragon-DoL

Contributor
Joined
Dec 22, 2018
Messages
103
In case anybody else stumbles upon this and don't want to modify TrueNAS itself, there is an alternative, executing the following command as root:

Code:
midclt call cloudsync.update 4 '{ "args": "--drive-acknowledge-abuse" }'


Make sure to replace "4" with the ID of the cloud task from your UI, can be found in the URL once you press "edit" on the cloud task.

To reset this argument, if you ever need it, use the following command

Code:
midclt call cloudsync.update 4 '{ "args": "" }'
 
Top