[google drive] Rclone fails to copy some shared files from the main drive to a shared drive

What is the problem you are having with rclone?

Rclone fails to transfer some files while I am migrating a shared, standard folder to a new shared drive.

The source is a shared folder on a regular gmail account, the destination is a shared drive in a gsuite account I am setting up. It contains a mix of google docs and regular files, but both seem to be equally affected.

I use a command I found in these forums ( [How To Move Files Server Side from My Drive to a Shared Drive] - can't add the link due to me being a new user here...), and I receive this error

$ rclone copy gdrive:folder1 gdrive-shared-drive:folder2 -vP --drive-server-side-across-configs=true
...
file2: Failed to copy: googleapi: Error 403: Sharing restrictions cannot be set on a shared drive item., teamDrivesSharingRestrictionNotAllowed
file3: Failed to copy: googleapi: Error 403: Sharing restrictions cannot be set on a shared drive item., teamDrivesSharingRestrictionNotAllowed
...

not all files fail though:

Errors:                10 (retrying may help)
Checks:                82 / 82, 100%
Transferred:           23 / 44, 52%

I tried to inspect from the web and I didn't notice any difference in permissions between files that succeed and files that fail to copy.

I am now very confused and am posting here in the hope that someone can reproduce or has any idea of what might be wrong.

What is your rclone version (output from rclone version)

Latest beta :sunglasses:

ruphy@pop-os:~$ rclone --version
rclone v1.54.0-beta.5133.3b1122c88

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Linux 64 bit

Which cloud storage system are you using? (eg Google Drive)

I am on Google Drive

hello and welcome to the forum,

to save the time of our experts, please post the exact version of rclone, as per the help template. thanks

What is your rclone version (output from rclone version)

hello @asdffdsa, I added it, apologies for not having done it earlier!

I think what that is saying is that the source drive (a normal drive) has files on it which can't be server side copied because the sharing restrinctions don't transfer to a shared drive.

You can fix that if you can, or you can do the copy, then do the copy again without --drive-server-side-across-configs=true which will download and re-upload the remaining files which should work.

Google permissions are very complicated and normal drives and shared drives are very different under the hood!

Hi Nick,

thank you for your answer.
I struggled to understand what "sharing restrictions" really meant, and after a few attempts, where I ended up enabling and disabling all I could (including unsharing the folder entirely), I had no luck. I cannot find any "sharing restriction" on the gdrive web UI.

Is there any command I could run to ensure there are no shared restrictions on these files? I am happy to change permissions and everything, as long as I can copy everything to the shred drive later.

Thanks!
Riccardo

I think this explains what sharing restrictions are

So I think it would need to be the admin on the source drive that needed to change things.

I don't know of one (but there are lots of things about drive I don't know!).

Did you try this?

Thanks for your link! Unfortunately it seems to mostly apply to GSuite users, and I still can't figure it out.

To add more context - the source is a GMail Drive, the destination is a non-profit GSuite drive of which I have an admin account.

In particular, it's puzzling how 60% of files didn't have any problems while the rest had. I tried to remove any restrictions whatsoever from the web interface, and removed all restrictions I could find on the org side. I still can't explain why it doesn't work...

This worked flawlessly (passing an explicit import and export format), but given that we are dealing with google docs, I am considering it as a patch (it exported and imported back documents, not exactly ideal as any conversion is a lossy path).

It worked okay for my usecase (simple and few docs), but I am still on my path to explore if there's any way I can fix it for future users that will stumble on this thread later.

Is there anything I could try?

P.s. I am happy to create you or any dev a temporary account in that org (it's an open source project org), if needed

Ah, I didn't realise we were talking about google docs. Not sure that make any difference...

Here are the docs for the copy command

My guess is that we are trying to copy something to the teamdrive that they don't support. Quite what I don't know.

If you were feeling adventurous you can try the actual copy command with various parameters from that page.

Do one thing, Use Rclone move instead of Copy.
move the files from mydrive to teamdrive,
Then try rclone copy from teamdrive to mydrive. (there is no restriction to copy from shared drives to my drive)
So, It Works (takes time and resources, but does online without downloading them)!!

Edit: I checked my theory, Got the same "Sharing restrictions cannot be set on a shared drive item"
at first, then moved my files to shared drive and re copied them to my drive.
IT WORKED!!

1 Like