Move Google Drive My Drive files to Shared Drive for different users

What is the problem you are having with rclone?

I am trying to move files from the Google Drive folder with a lot of files owned by different internal users to a Shared Drive

Which cloud storage system are you using? (eg

Moving files owned by different internal users from My Drive Folder on Google Drive to Google Shared Drive

The command you were trying to run

rclone move md:/source SD:/destination/ --log-file rclone/logs/sharedDrive.log --drive-server-side-across-configs --drive-impersonate superadmin@domain.com -vv

A log from the command with the -vv flag

ERROR : 3- Internal Folder /6- example.png: Couldn't move: googleapi: Error 403: Cannot move a file into a shared drive as a writer when the owner of the file is not a member of that shared drive., fileOwnerNotMemberOfTeamDrive

Notes:

It is working good if I add the owner of the file as a contributor on the shared drive. But, Do I need to add all files owners as contributors to shared drives so I can move files? I can move their files with drag and drop with no need to add them to shard drive.

Shared drive settings are as follows :slight_smile:

I am using super admin account

Shared drive settings:
People outside the organisation can be added to files
People who aren't shared drive members can be added to files
Viewers and commenters can download, print, and copy files

The first error message seems to be saying that they can't be added as a writer to the file without being a member of the shared drive.

If you do the drag and drop copy I suspect they will no longer be able to write to the file unless you add them to the shared drive - is that right?

1 Like

Drag and drop will move files. And they will have access to files only all files on the shared drive.

When rclone moves a file between folders all it does is change the parent of the folder using this code

		info, err = f.svc.Files.Update(shortcutID(srcObj.id), dstInfo).
			RemoveParents(srcParentID).  // remove old parent directory
			AddParents(dstParents). // add new parent directory
			Fields(partialFields). // fields wanted in the result
			SupportsAllDrives(true). // yes, include shared drives too
			Context(ctx).Do()

Here are the docs

I don't know why the API is giving that error (which isn't documented as far as I can see!). Maybe there is something rclone can do about it, but I'm not sure.

If you could do a bit of research to find out why, that would be great.