My Moved/Deleted files are Restored always saying "You do not have edit permissions"

Many times when I move or delete files it’s seems to work well, but then I find that those files are stocked at the trash waiting to be deleted.

I have configured the trash as “Auto Empty Trash - Immediately”, and I’m using the last version of odrive (5246).
When I click on “Empty Trash” I receive a message that says “You do not have edit permissions” and restore the file. So I have back the files I have deleted, and the files that I have moved are now at their new place and at the place they were before I move them (so have them twice).
I have permission to edit for sure becuase are files I have created.

This has happen moving\deleting files of Google Drive, not sure if this happen on any other cloud service.

Hi,
Are these files in a shared folder? Are you able to delete them from the Google Drive web client directly?

Can you send a diagnostic from the odrive tray menu and tell me what specific paths are exhibiting the issue?

Thanks!

Hi Tony, thanks for your quick answer.
You’re right, the files are at a folder that is shared with other users.
And yes, I can delete them directly from my account of Google Drive via web.

I can add that the same has occurred for files at “BOX” and at "OneDrive"
In the case of the box files, them are at shared folder. But the files from OneDrive are not shared. I can delete the files directly via web in both cases.

I sent the diagnostic, and sorry but I don’t understand what you mean with “paths”.

Thanks again, I’ll be pending for hear from you.

Tony,
forget about “I can add that the same has occurred for files at “BOX” and at “OneDrive”” Is not true, those are working well.

I have checked and all files comes from Google Drive, from a shared folder.

Hi @dzv.mail ,
My apologies for not responding to this. It got lost in the shuffle. Are you still having issues with this?

Hi Tony,
yep, still with the problem:

Files that I delete/move from a shared folder of my Google Drive that are restored to its original place once I try to empty the trash of odrive.

Says “You do not have edit permissions” but I’m the owner of the files. Actually I can delete/move it via web (from my Google Drive account) with no problem at all.

I have linked other services like BOX, DropBox, etc. And works just great (even with shared folders). This problem happens just with Google Drive.

Hi @dzv.mail,

I have confirmed when user delete a file from shared folders under “Shared with Me”, despite of having “Can Edit” rights in Google Drive, we give “You do not have edit permissions” during empty trash. This is something we need to look at our ends.

Although, rename / move operations are working fine for me in shared folders under “Shared with Me”. Recently, we have introduced alot of improvements to move tracking which might have also fixed the problem you have stated earlier.

Please let me if you are still facing issue with rename / move operations.

Thanks,
Asif

I’m experiencing this problem.

I moved a bunch of files into a subdirectory and when I tried to empty the trash, I got the permissions error mentioned above. This is in a shared Google Drive folder.

Setting aside the permissions problem for the moment, I just moved some 140 files. And the empty trash operation stops after a single error. So I’ve now got to repeat this process another 139 times… Empty trash > OK > accept error. Super frustrating!

Back to the problem at hand: it looks like a limitation with the Google Drive API. I think the only way to “delete” these files is to remove all privileges for the file.

Moving files are similarly complicated: do you actually want to just move files and retain privileges as is, or duplicate the files and delete permissions to the originals? I see the need for both…

The good news is, once I figured that part out and deleted things with Drive’s web interface, odrive did the right thing so I didn’t actually have to empty trash another 139 times. Just ~5 times before I started looking for alternatives.

The not so good news is that this was part of a cleanup involving multiple links. I’d moved files from another account to this shared folder. When I removed this shared folder (which I owned), the files that were supposed to move into it just vanished. They got deleted from their original account, and never made it to the shared folder. I suspect this is a separate issue though… If it helps, I’d noticed odrive had this file move queued up. I assumed it was stuck waiting for the trash to be emptied, and it did disappear once I resolved the issue above.

I feel that if there was a way to enable immediate trashing, these problems would have been visible right away and then I’d have the ability to fix it right away. Instead, it took a while for me to notice that the changes weren’t going through and by then there were a lot of actions queued up.

Having the same problem but I think it is due to another reason.
Initially I have unintentionally linked not to google drive but to gmail.
I than unlnked this service and linked google drive. There are some leftovers though in my local folder which include the contacts and shared with folders.
Now that I have changed that I have no way to remove thee, folders.

Solved - I clicked the folder so it is actually in my local drive (synced) and than could delete it

Hi @hamerovv,
It sounds like you have this solved, but I just want to make sure. You were seeing some residual folders from the Gmail link inside the Google Drive link?

This happens when I click “empty the trash bin” in odrive

09 Mar 11:04:03AM ERROR Failed Delete File (Local to Remote) for Item: G:\ERP_IMAGES_PARTS\NEW…jpg - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
“error”: {
“code”: 403,
“message”: “Insufficient permissions for this file”,
“errors”: [
{
“message”: “Insufficient permissions for this file”,
“domain”: “global”,
“reason”: “forbidden”,
“location”: “file.permissions”,
“locationType”: “other”
}
]
}
}

  • forbidden)
    09 Mar 11:04:03AM INFO Successful restore of odrive trash item: G:/ERP_IMAGES_PARTS/NEW/…jpg

I have just read some forum entries describing the same issue. As I understand the reason is that the files I want to be deleted do not belong to me and therefor cannot be deleted (although I am the superuser/admin account)

It is a very disappointing behavior as this is exactly what I needed odrive for → collaboration and sync in GDRIVE → further file processing on server.

Since this thread is a little older is there any released solution for this issue?

Hi @mercteil,
Unfortunately google doesn’t provide an API for us to remove the shared files, which is why it needs to be done from the Google Drive web client, currently.

When I looked at this last, the best we could do was to “orphan” the shared file (by removing its parents), which would place it into the root of your Google Drive. This can help a little bit, in that all of the deleted shared items are put into one spot so that they can be cleaned-up from the Google Drive web client, but it is definitely confusing and could cause more issues than it solves, so we haven’t gone that route yet.

A better solution is to use Google’s “Shared Drives” (previously known as “Team Drives”). These allow for more options including giving “content management” rights to users so that they can delete items. Those items will then go into a specific recycle bin for that Shared Drive.