Empty trash and sync all deletes - NOT working?

I hope you can help. I am now sitting with over 2000 files in the odrive trash!
When I click on the option “Empty trash and sync all deletes”, it RESTORES one file and then pops up a window saying One file restored, gives the file name and says I cannot edit it because I do not have permission???

Hi @logistics,
Are you on Windows or Mac? It’s possible there is a bug being hit with the tray menu, but we can try running the CLI to see if it gives us better insight/results.

Hi Tony,
I am running Windows 10. I have a screen shot of the error. How do I upload it for you?

Hi @logistics,
You can upload it to odrive and share the link.

Can you also send a diagnostic from the odrive menu so I can take a look?

Hi @logistics,
I think I know what the issue is here. This is in a Google Drive share? The main issue stems from the fact that removing an item you do not own from a share is not a “delete” but a “remove”. The delete API we use for deletes to Google Drive is not accepted because of lack of ownership of the file.

Here is a post that goes into it in more detail:

If you want to remove shared items you will need to do so from the Google Drive webclient, for now.

Thanks Tony,
I will try working from the Google Drive Web client. I am however the admin on our Google drive setup and have full rights to all the files. I can see where the confusion may come in though.

I will give it a bash and let you know.

Thanks for the help.


Thanks Basil. Yeah it is confusing, and I would like us to try to account for it in the future. I think the hard rule is that you actually need to be the original owner of the file to be able to delete it.

Morning Tony,
I am afraid that the google theory is not the answer! I disabled odrive and logged into google drive on the web. There were 7 files in the trash and I emptied the trash. Went back to odrive and had 7 more files in odrive trash!!

Where is the odrive trash folder physically located? Is it on my pc or in my cloud odrive?

The other point I think that we are missing is that odrive knows that those files are trashed, but when I select the empty trash option, it is attempting to restore the files???

I am the only user of odrive in the office. The other users just use google drive. I setup google drive and created all the folders etc. I shared the drive and folders with other users as per their requirements for access to certain files and folders. - Therefore I do not see it being a permissions issue.

Is there any other way to empty the trash folder??

Hi @logistics,
Thanks for the reply.

The odrive trash isn’t storing anything physical. All it is doing is holding the delete command from going to the cloud, until you say to send it. Entries end up in that queue when files that exist in your cloud storage are deleted on your local system. When that happens, odrive picks up that the file is now gone and stores the potential delete command for the cloud in the “odrive trash”. When you empty the trash, odrive send the command to the cloud storage to delete that file. If you choose to “restore” the file, it adds back the placeholder file (.cloud) locally, where it was deleted.

In the case of Google Drive’s “Shared with me” folder: If you end up deleting an item locally in the “Shared With Me” folder, it is, again, sent to the “odrive trash”. When you choose to empty the trash, odrive tries to tell Google Drive to delete that file. Google responds back and says that your user does not have permission to delete that file. When that happens odrive “restores” the file by adding the placeholder back to where it was originally deleted locally. This is done so that the file is not stuck, invisible, in the odrive trash. Since you can’t delete it, it is put back where it belongs.

Does that make sense?

So your options for clearing files in the “odrive trash” that are not allowed to be deleted in the cloud is to:

  • Restore them
  • Remove them from the share from Google Drive’s web client. You can do this by right-clicking on the file and selecting “Remove”.

Hi Tony,

It is not a “shared with me folder” it is “my drive” on google drive?

Anyway, I have 3 google drive folders (different accounts), one dropbox folder and one OneDrive folder linked to odrive. As far as I understand, the physical files reside on my pc and odrive syncs the files to the cloud??? Correct?

If I uninstall odrive, will the physical files remain on my pc or will they be left somewhere in the cloud?

Hi Basil,

For the files you are having trouble with, are they listed as being owned by you or owned by someone else? You can see this in Google Drive’s web client, like so:

I was using “Shared With Me” as a reference point, but you can have files that have been shared with you anywhere within Google Drive.

If the files that are throwing the permission’s error are owned by you, then this may be a different issue (unless they are inside a folder that you do not own and have removed write permissions, for example).

For syncing, odrive will sync any new or changed files that you place into the odrive folder to the cloud. It also give you the opportunity to sync down (download) files from the cloud. You probably noticed that odrive started out with all placeholder files (.cloud and .cloudf). These represent your cloud data without taking up space on your system. You can then download those files/folders, if you wish, to create a copy of the data on your local machine. If those copies are changed locally, then odrive will sync those changes back to the cloud, etc…

If you uninstall odrive, the data will remain in the cloud and the data locally will remain as it exists at the time of uninstall, but they will not longer be linked, of course.

Does that answer your question?

Hi Tony,

I am the owner of the files and the folders. It looks to me as if I will not get this resolved unless I upgrade my subscription?

I just attempted to delete a file from the trash by right clicking it, it asks if I want to restore or delete - I select delete, A few seconds later I get the “you have restored this file, but you do not have edit permissions.”

Reading the manual, the descriptions about empty trash etc are very different to my “free” system.

My concern with uninstalling odrive is that all my data is now in the odrive cloud as well - yes or no? I thought when I first installed odrive and linked my google drives to it, that copies of my data would still only reside in/on the respective google drive locations (In the cloud somewhere I suppose)

I think I am going to have to go back to native google drive, even though odrive makes life easier everywhere else, I cannot go on getting more and more files in the trash that I cannot empty.

Thanks again fr all your help.



Hi @logistics,
Emptying the trash doesn’t require a premium account. The only thing trash-related that requires Premium is auto empty trash.

Keep in mind that the errors you are seeing are actually coming from Google Drive. We are sending it a command and it is telling us that your user doesn’t have permission to do that action. We are trying to make it happen, but Google isn’t letting us :slight_smile:

We don’t store any of your data. We just allow you to link to your data and access and manage it better where it resides. When you are syncing your data, the odrive client is uploading/download directly to the linked storage.

For this trash issue, can you please do the following so I can take a deeper look:

  • Reproduce the “you have restored this file, but you do not have edit permissions.” message again and take a screenshot of it.
  • Send a diagnostic from the odrive menu


Hi Tony,
In the screenshot, I selected Sync Delete, then the second message pops up.

The reason there are so many deleted files from the quotes folder is that we had too many quotes going back to 2013. I then created sub folders in the quotes folder, 2013, 2014 etc and moved the relevant files into the sub folders.

This was all updated properly on google drive, as the other users who only use the google interface, then saw all the changes I made and on their side, all is well.

Tony, when you say here that odrive sends the command to the cloud storage to delete the file, I am a bit confused as the file is no longer physically in that cloud storage location? All odrive should do, surely, is to remove the pointer to the deleted file that it is holding in the trash folder. Or am I being a bit too simplistic? - what i mean, is that odrive does not have to ask google drive if it can delete the file, google drive has already deleted it. And the instruction to google drive, to delete the file, was actually sent, received and acted upon by google drive, via odrive. As far as google drive is concerned, the transaction is complete. There are no files (or pointers) in google drive trash relating to the delete.
When I delete a google drive file via odrive, odrive should let google hold it in google trash folder and forget about it. That way I could go to google drive and empty its trash, (If it did not do it automatically)

Anyway, did you glean any information from the last diagnostic?

Hi @logistics,
I am taking a look through the diagnostics. When things are in the odrive trash it should be because the files still exist in the cloud but it was noted that they were removed locally. The diagnostics only go back a little ways, so I can’t see the historical events that led up to this point.

It looks like all of the odrive trash files are in “Google Drive (Aqua)/Aqua Africa”. A shortcut here is to just right-click->unsync the “C:/Users/Basil/odrive/Google Drive (Aqua)/Aqua Africa” folder. That will clear the odrive trash queue of any items in “Google Drive (Aqua)/Aqua Africa” and turn C:/Users/Basil/odrive/Google Drive (Aqua)/Aqua Africa into a placeholder (C:/Users/Basil/odrive/Google Drive (Aqua)/Aqua Africa.cloudf).

I think that should bring things back into a more consistent state.

I also noticed you have a folder inside the odrive folder that doesn’t appear to be a linked account:
“C:/Users/Basil/odrive/Odrive Problem”

You cannot place anything in the root of the C:/Users/Basil/odrive folder because there is no storage backing it. odrive does not store any files, so there is nowhere for that folder to be uploaded. You will need to move that folder elsewhere.

If you are curious about the “insufficient permissions” error, this is an example of what Google is sending back when trying to send the delete for some of these files:

07:44:59PM None 9140 RAISED apply_remote_delete_file Google Drive (Aqua)/Aqua Africa/Sales/Sales Invoices/AAL-171 Mukuba Mall.xlsx’]) --> SyncAdapterRequestException(code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
“error”: {
“errors”: [
“domain”: “global”,
“reason”: “forbidden”,
“message”: “Insufficient permissions for this file”,
“locationType”: “other”,
“location”: “file.permissions”
“code”: 403,
“message”: “Insufficient permissions for this file”

  • forbidden))

In summary, the next actions you attempt are:

  1. Move “C:/Users/Basil/odrive/Odrive Problem” somewhere else.
  2. Right-click->unsync the “C:/Users/Basil/odrive/Google Drive (Aqua)/Aqua Africa” folder

I think these steps will bring us much closer to a known-good state.

Hi Tony,

Here is the result of the attempt to unsync