Google Drive sync cannot specify rood_folder_id

Ender117

Patron
Joined
Aug 20, 2018
Messages
219
So, I am testing the cloud sync feature of FreeNAS and was greeted by an error
Code:
error reading destination directory: couldn't list directory: googleapi: Error 403: The granted scopes do not give access to all of the requested spaces., insufficientScopes


With some troubleshooting, I believe that was due to the drive.appdata scope was used but root_folder_id was not set correctly. rclonetries to read the root folder and got denied, hence the error.

Specifically, the config generated by FreeNAS contains:
Code:
[remote]
token = {"access_token":"***","token_type":"***","refresh_token":"***","expiry":"***"}
type = drive
folder = foldername


And a working config generated by running rclone in CLI:
Code:
[Gdrive]
type = drive
scope = drive.appfolder
root_folder_id = appDataFolder
token = {"access_token":"***","token_type":"***","refresh_token":"***","expiry":"***"}


Apparently the scope and root_folder_id is missing, but only the latter would generate the same error when comments out (while the former seems to do nothing when comments out).

For obvious reasons you may not want to expose the root folder, so I believe this is an important feature. Some boxes to let you manually enter "advanced options" should be able to do the job.

PS:I am currently running 11.2-U4 so this may have been addressed already. Please let me know if this is the case
 

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
Sure, that your Google account was registered properly? Are you using two factor authentication? Then it is maybe a bit more complicated.

In general, if you have no special reason for 11.2, I would go in 11.3. There is much more and better cloud support, which works without problems.
 

Ender117

Patron
Joined
Aug 20, 2018
Messages
219
Sure, that your Google account was registered properly? Are you using two factor authentication? Then it is maybe a bit more complicated.

In general, if you have no special reason for 11.2, I would go in 11.3. There is much more and better cloud support, which works without problems.
Well

If the token was generated with drive scope, both the GUI and running rclone in CLI works.

If the token was generated with drive.appdata scope, GUI does not work but CLI works. Furthermore, comments out the root_folder_id line would generate the same error as the GUI did. So I am pretty confident root_folder_id is the cause.


I am hesitate to update because FreeNAS is hosting storage for my virtualization infrastructure, update would require bringing almost everything down.
 

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
Ah okay. Then the account data shouldn't be the problem.
If no one else has a fast solution, I would setup a basic configured freenas VM with frenas 11.3 and check if it works there.
 
Top