Expectations for Drive copy with sharing permissions?

What is the problem you are having with rclone?

No problem, as such. I'm not clear on the expectations when copying a file from one My Drive (Source:) to another My Drive (Target:) when sharing permissions are set on the file.

In my case, the file is copied from Source: to Target: without issue, but no sharing permissions are recreated after the copy. Is this normal behavior? Is it possible to preserve the permissions?

I couldn't find any relevant documentation on the subject and would appreciate a link if it exists. Thanks!

What is your rclone version (output from rclone version)

v1.53.3

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

Windows 10

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

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy Source: Target: --drive-server-side-across-configs

The rclone config contents with secrets removed.

[Target]
type = drive
scope = drive
token = {"access_token":"REDACTED","token_type":"Bearer","refresh_token":"REDACTED","expiry":"2021-01-20T11:01:00.7129017-06:00"}
client_id = REDACTED
service_account_file = C:\Users\Chad\.config\rclone\target.json

[Source]
type = drive
scope = drive
token = {"access_token":"REDACTED","token_type":"Bearer","refresh_token":"REDACTED","expiry":"2021-01-20T11:00:59.7654613-06:00"}
client_id = REDACTED
service_account_file = C:\Users\Chad\.config\rclone\source.json

A log from the command with the -vv flag

2021/01/20 13:46:52 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "copy" "Source:" "Target:" "--drive-server-side-across-configs" "-vv"]
2021/01/20 13:46:52 DEBUG : Using config file from "C:\\Users\\Chad\\.config\\rclone\\rclone.conf"
2021/01/20 13:46:52 DEBUG : Creating backend with remote "Source:"
2021/01/20 13:46:52 DEBUG : Google drive root '': root_folder_id = "0ANK1xd3sAx84Uk9PVA" - save this in the config to speed up startup
2021/01/20 13:46:52 DEBUG : Creating backend with remote "Target:"
2021/01/20 13:46:53 DEBUG : Google drive root '': root_folder_id = "0ALcRX0-WmpNVUk9PVA" - save this in the config to speed up startup
2021/01/20 13:46:53 DEBUG : Google drive root '': Waiting for checks to finish
2021/01/20 13:46:53 DEBUG : Do not share/My Resume.docx: Modification times differ by -24h14m51.123s: 2021-01-20 19:46:11.217 +0000 UTC, 2021-01-19 19:31:20.094 +0000 UTC
2021/01/20 13:46:53 DEBUG : Google drive root '': Waiting for transfers to finish
2021/01/20 13:46:57 DEBUG : Google drive root '': Sleeping for 2s before setting the modtime to work around drive bug - see #4517
2021/01/20 13:46:59 INFO  : Do not share/My Resume.docx: Copied (server side copy)
2021/01/20 13:46:59 INFO  :
Transferred:           off / off, -, 0 Bytes/s, ETA -
Checks:                 1 / 1, 100%
Transferred:            1 / 1, 100%
Elapsed time:         7.5s

2021/01/20 13:46:59 DEBUG : 10 go routines active

Rclone preserves some things on a server side copy and relies on drive to preserve the rest.

It doesn't deliberately preserve the sharing - this doesn't seem to be straight forwardly possible with the COPY api.

Thanks! It looks like I'll need to use a server-side move operation to preserve the permissions (along with comments and document history).

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.