Failure to synchronize using Google Drive

Get help for specific problems
Posts: 1
Joined: 20 Mar 2021

Pablo

I'm encountering this issue and I can't find a way to fix it.
I'm synchronizing a local folder with a folder in a shared drive, that belongs to a G Suite organization that my user doesn't belong to. My user does have full "manager" access to the folder, though.

The problem I'm encountering is with FFS failing to detect which files have been moved, which ends up in duplicated files everywhere (and unnecessarily reuploading and redownloading all files)

When synchronizing ("two-way"), it goes like this:

- The first time it works like a charm.
- After I move files around, the second time synchronizing it correctly detects the moved files, but after doing all the file operations, it gives the error 'Cannot delete file "gdrive:\[...]\sync.ffs_db". The user does not have sufficient permissions for this file.' My user does have permissions, though, and I can delete the file through the web interface without problems.
- The third time synchronizing, "Compare" doesn't work correctly and fails to detect all the moved files. I assume it's because the 2nd time it failed to update the file sync.ffs_db.

Is there any way to get around this? I'm trying to figure out this workflow and teach it to several other people, so ideally it should be really simple. I want to avoid them having to get to the 'Cannot delete file' error, and then having to manually go to the web interface to delete it and then pressing 'Retry' on FFS.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

Posts: 5
Joined: 7 Sep 2022

laurence

Hi,

I have a similar problem which I'm always hoping the next update will fix but so far it persists. I've just been ignoring it, which for the most part is fine but I miss out on the advantage of tracking moved files so files are deleted and transferred again if I move or rename files. I'm synchronising to a Google Shared Drive. I'm not an admin <edit> I'm a Content Manager </edit> but I do have permissions to read and write to the drive.

My error message:

Cannot delete file "gdrive:/<removed for privacy>.sync.ffs_db".
The user does not have sufficient permissions for this file.


I can log into Google Drive through the browser using the same credentials and delete the sync.ffs_db file. But something is blocking it from being deleted or written over by FFS after the first sync.

Is there a setting I should change, or is the database sync not possible with my particular setup?

thanks,
Laurence
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

I'm synchronising to a Google Shared Drive. I'm not an admin <edit> I'm a Content Manager </edit> but I do have permissions to read and write to the drive.

My error message:

Cannot delete file "gdrive:/<removed for privacy>.sync.ffs_db".
The user does not have sufficient permissions for this file.


I can log into Google Drive through the browser using the same credentials and delete the sync.ffs_db file. But something is blocking it from being deleted or written over by FFS after the first sync. laurence, 07 Sep 2022, 23:49
I believe the ".sync.ffs_db" file was created by some other account, so you're not the owner, therefore deletion fails.
When you manually go to Google Drive via browser, the website doesn't delete the file, but "unlinks" it from the parent folder (= making it an orphan file, still consuming space): https://stackoverflow.com/a/53472203
Posts: 5
Joined: 7 Sep 2022

laurence

That's a bummer. Thanks for the detailed explanation.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

When you manually go to Google Drive via browser, the website doesn't delete the file, but "unlinks" it from the parent folder Zenju, 08 Sep 2022, 12:24
I've just realized that this is what FFS is *already doing* (otherwise Shared Drive wouldn't be very useful)

This means either there's some bug in FFS, or your permissions are such that you are not allowed to unlink the ".sync.ffs_db" file.
Posts: 5
Joined: 7 Sep 2022

laurence

Thanks Zenju. I asked our IT support and have confirmed that my user has access to 3rd party apps and the Google Drive SDK API in the Admin console. He did make a suggestion – is is possible to save the .sync.ffs_db file outside of the Google Drive? I realise that it's currently setup to relate the the containing folder, but would something like that be possible, to keep all database files on the local drive?
Posts: 5
Joined: 7 Sep 2022

laurence

Hi Zenju,

I'm not sure if this helps but I wanted to add an observation. In the sychronisation settings I changed "Deleted files" from "Recycle bin" to "Permanent" and I received the same user permissions error when updating any files on the Google Drive end (files which needed to be deleted and rewritten). Switching this back to "Recycle bin" works again for file sync to Google Drive but I still get the error for the sync.ffs_file.

Does this offer any insight as to the API or method in which the sync.ffs_db file is deleted and is being stopped by permission errors?

cheers,
Laurence.
Posts: 4
Joined: 7 Jul 2021

moo.marc

is is possible to save the .sync.ffs_db file outside
I second that. I'm also using another sync program in the same directory and I'd like to avoid sync issues with the db file AND the _lock file it temporarily creates next to it. It would be nice to have the option to place these files wherever we want.

Cheers
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

I'm not sure if this helps but I wanted to add an observation. In the sychronisation settings I changed "Deleted files" from "Recycle bin" to "Permanent" and I received the same user permissions error when updating any files on the Google Drive end (files which needed to be deleted and rewritten). Switching this back to "Recycle bin" works again for file sync to Google Drive but I still get the error for the sync.ffs_file. laurence, 30 Sep 2022, 03:50
Yes, this helps. Things are starting to make sense now:

It appears that you have rights to trash a file, but not to delete it. When you "delete" a file via browser you are actually only moving it to the trash, not permanently deleting it.

In other words, it appears you have "Content Manager", but not "Manager" access level: https://support.google.com/a/users/answer/9310249#1.2

Technically, the role names are "fileOrganizer" and "organizer":
https://developers.google.com/drive/api/guides/about-shareddrives#specific_roles_for_shared_drives
https://developers.google.com/drive/api/guides/ref-roles
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

ToDo for FFS: Support overwriting files in Google Drive (rather than deleting and creating a new one).