Hi,
We have lot of files stored in various users Google Drive. I have uploaded files to a share which belongs to another user. So the files owner is still me because I uploaded the file.
With --drive-auth-owner-only my file is never downloaded. Not in my download as file owner and not in the download of the owner of the shared folder.
Without that parameter the file is downloaded twice. This is only an example. In reality we have hundreds of thousands of files that would be downloaded x times and this would be a problem.
Any idea on that?
Regards,
Sony
Why is it downloaded twice? What do the rclone logs look like? Do you see it twice if you do an rclone ls
?
The shared folder is owned by user 1. The user 2 has added the shared folder to his âMy Driveâ and stored a file in it.
On download the file is the downloaded twice (on both users), I think because it can be seen in the shared folder in both users âMy Driveâ. rclone ls also shows the file twice.
And with --drive-auth-owner-only the file isnât downloaded at all and rclone ls doesnât show it.
The way --drive-auth-owner-only
works is it looks through the owners
of a file and checks if the me
flag is set. See the API docs for the definitions of the fields.
So it must be google returning that the file isn't owned by you I think.
If you do this...
rclone -vv --drive-auth-owner-only --dump-bodies ls drive:path/to/a/file
You'll see something like this at the end
{
"files": [
{
"id": "1t7DA1Xsg_dElagvlr-wtRaIBFlrLY-tN",
"name": "date.txt",
"mimeType": "text/plain",
"trashed": false,
"createdTime": "2018-01-29T11:44:53.681Z",
"modifiedTime": "2018-01-29T11:45:36.605Z",
"owners": [
{
"kind": "drive#user",
"displayName": "Nick Craig-Wood",
"photoLink": "https://lh3.googleusercontent.com/-wP_Dh_m9kJc/AAAAAAAAAAI/AAAAAAAAEBE/m8ETvnfBPCA/s64/photo.jpg",
"me": true,
"permissionId": "17383914067640380997",
"emailAddress": "XXXXXX@gmail.com"
}
],
"md5Checksum": "ae2ffbcbe74bc7f56ff9c4e9ef2919cf",
"size": "29"
}
]
}
What does that look like for you? And have you tried the latest beta?
Iâve just downloaded the latest beta and did some tests. Here are the logs:
U:\rclone>
U:\rclone>rclone ls User_Drives: --drive-impersonate=test1@⌠--drive-auth-owner-only
-1 tester01.docx
-1 tester01/tester01.xlsx
U:\rclone>rclone ls User_Drives: --drive-impersonate=test2@⌠--drive-auth-owner-only
U:\rclone>
====
U:\rclone>rclone -vv --drive-auth-owner-only --dump-bodies ls User_Drives:tester01 --drive-impersonate=test1@âŚ
âŚ
{
âfilesâ: [
{
âidâ: â1LaU2PglAjRCNkSlKglonM_7sBmNOfb5j2T6B5RZsUZEâ,
ânameâ: âtester02â,
âmimeTypeâ: âapplication/vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:05:23.601Zâ,
âmodifiedTimeâ: â2018-02-19T02:05:35.749Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest2â,
âmeâ: false,
âpermissionIdâ: â08692407437160094243â,
âemailAddressâ: âtest2@âŚâ
}
]
},
{
âidâ: â19Fj5bKYQPWtS6dxOr-nt7_GirVgfQiVG8v74DvFtVhsâ,
ânameâ: âtester01â,
âmimeTypeâ: âapplication/vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:03:08.687Zâ,
âmodifiedTimeâ: â2018-02-19T02:03:26.899Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: true,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
}
]
}
âŚ
===
U:\rclone>rclone -vv --drive-auth-owner-only --dump-bodies ls User_Drives:tester01 --drive-impersonate=test2@âŚ
âŚ
{
âfilesâ: [
{
âidâ: â1LaU2PglAjRCNkSlKglonM_7sBmNOfb5j2T6B5RZsUZEâ,
ânameâ: âtester02â,
âmimeTypeâ: âapplication/vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:05:23.601Zâ,
âmodifiedTimeâ: â2018-02-19T02:05:35.749Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest2â,
âmeâ: true,
âpermissionIdâ: â08692407437160094243â,
âemailAddressâ: âtest2@âŚâ
}
]
},
{
âidâ: â19Fj5bKYQPWtS6dxOr-nt7_GirVgfQiVG8v74DvFtVhsâ,
ânameâ: âtester01â,
âmimeTypeâ: âapplication/vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:03:08.687Zâ,
âmodifiedTimeâ: â2018-02-19T02:03:26.899Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: false,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
}
]
}
âŚ
BTW I forgot to mention that we use a service account config, therefore the additional parameters. Could this cause the problem?
From your logs above, it looks like google is returning the "me" flag relating to the --drive-impersonate
Hmm, quite possibly!
I understand from your post that
rclone ls User_Drives: --drive-impersonate=test2@⌠--drive-auth-owner-only
returned no entries, but when you ran it with --dump-bodies
rclone -vv --drive-auth-owner-only --dump-bodies ls User_Drives:tester01 --drive-impersonate=test2@âŚ
I can clearly see that it returned an "owner" with "me: true" which it definitely should have printed so it should have printed "tester02.xslx"
Is that correct? Can you double check that for me please? I see in the first try you uses the remote User_Drives:
but the second User_Drives:tester01
.
It would be helpful for me if I could see the complete output of the commands - feel free to redact email addresses and anything else you like.
Thanks
C:\rclone>rclone ls User_Drives: --drive-impersonate=test1@⌠--drive-auth-owner-only
-1 Doc in root of test01 - file owner test01.docx
-1 tester01_Sheet in shared folder tester01 (owned by test01) - file owner test01.xlsx
C:\rclone>
===
C:\rclone>rclone -vv --drive-auth-owner-only --dump-bodies ls User_Drives: --drive-impersonate=test1@âŚ
2018_02_20 13:22:52 NOTICE: --dump-bodies is obsolete - please use --dump bodies instead
2018_02_20 13:22:52 DEBUG : Using config file from âc:\âŚ\rclone.confâ
2018_02_20 13:22:52 DEBUG : rclone: Version âv1.39-161-gafc963edâ starting with parameters [ârcloneâ â-vvâ ââdrive-auth-owner-onlyâ ââdump-bodiesâ âlsâ âUser_Drives:â ââdrive-impersonate=test1@âŚâ]
2018_02_20 13:22:52 INFO : Google drive root ââ: Modify window is 1ms
2018_02_20 13:22:52 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:52 DEBUG : HTTP REQUEST (req 0x13b07a00)
2018_02_20 13:22:52 DEBUG : POST _o_oauth2_token HTTP_1.1
Host: accounts.google.com
User-Agent: rclone_v1.39-161-gafc963ed
Content-Length: 859
Content-Type: application_x-www-form-urlencoded
Accept-Encoding: gzip
assertion=âŚ
2018_02_20 13:22:52 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:52 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:52 DEBUG : HTTP RESPONSE (req 0x13b07a00)
2018_02_20 13:22:52 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Disposition: attachment; filename=âjson.txtâ; filename*=UTF-8â'json.txt
Content-Type: application_json; charset=utf-8
Date: Tue, 20 Feb 2018 12:22:56 GMT
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Server: ESF
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
fa
{
âaccess_tokenâ : ââŚâ,
âexpires_inâ : 3600,
âtoken_typeâ : âBearerâ
}
0
2018_02_20 13:22:52 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:52 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:52 DEBUG : HTTP REQUEST (req 0x13d4a100)
2018_02_20 13:22:52 DEBUG : GET _drive_v3_files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cowners%29%2CnextPageToken&pageSize=1000&q=trashed%3Dfalse+and+%27root%27+in+parents HTTP_1.1
Host: www_googleapis_com
User-Agent: rclone_v1.39-161-gafc963ed
Authorization: XXXX
Accept-Encoding: gzip
2018_02_20 13:22:52 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:53 DEBUG : HTTP RESPONSE (req 0x13d4a100)
2018_02_20 13:22:53 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application_json; charset=UTF-8
Date: Tue, 20 Feb 2018 12:22:56 GMT
Expires: Tue, 20 Feb 2018 12:22:56 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
3c0
{
âfilesâ: [
{
âidâ: â1EuLtoxkP6OETcCdoVNnbbqGVKFPkyilZâ,
ânameâ: âtester01â,
âmimeTypeâ: âapplication_vnd.google-apps.folderâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:03:00.004Zâ,
âmodifiedTimeâ: â2018-02-20T12:19:47.042Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: true,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
},
{
âidâ: â1L7vKJQi6WIXGDjbA6BwCEELNWr46XBakYsx_2DeryT8â,
ânameâ: âDoc in root of test01 - file owner test01â,
âmimeTypeâ: âapplication_vnd.google-apps.documentâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:02:29.984Zâ,
âmodifiedTimeâ: â2018-02-20T12:04:18.155Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: true,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
}
]
}
0
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:53 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:53 DEBUG : HTTP REQUEST (req 0x13d4a300)
2018_02_20 13:22:53 DEBUG : GET _drive_v3_about?alt=json&fields=exportFormats HTTP_1.1
Host: www_googleapis_com
User-Agent: rclone_v1.39-161-gafc963ed
Authorization: XXXX
Accept-Encoding: gzip
2018_02_20 13:22:53 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:53 DEBUG : HTTP RESPONSE (req 0x13d4a300)
2018_02_20 13:22:53 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application_json; charset=UTF-8
Date: Tue, 20 Feb 2018 12:22:56 GMT
Expires: Tue, 20 Feb 2018 12:22:56 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
4c0
{
âexportFormatsâ: {
âapplication_vnd.google-apps.documentâ: [
âapplication_rtfâ,
âapplication_vnd.oasis.opendocument.textâ,
âtext_htmlâ,
âapplication_pdfâ,
âapplication_epub+zipâ,
âapplication_zipâ,
âapplication_vnd.openxmlformats-officedocument.wordprocessingml.documentâ,
âtext_plainâ
],
âapplication_vnd.google-apps.spreadsheetâ: [
âapplication_x-vnd.oasis.opendocument.spreadsheetâ,
âtext_tab-separated-valuesâ,
âapplication_pdfâ,
âapplication_vnd.openxmlformats-officedocument.spreadsheetml.sheetâ,
âtext_csvâ,
âapplication_zipâ,
âapplication_vnd.oasis.opendocument.spreadsheetâ
],
âapplication_vnd.google-apps.jamâ: [
âapplication_pdfâ
],
âapplication_vnd.google-apps.scriptâ: [
âapplication_vnd.google-apps.script+jsonâ
],
âapplication_vnd.google-apps.presentationâ: [
âapplication_vnd.oasis.opendocument.presentationâ,
âapplication_pdfâ,
âapplication_vnd.openxmlformats-officedocument.presentationml.presentationâ,
âtext_plainâ
],
âapplication_vnd.google-apps.formâ: [
âapplication_zipâ
],
âapplication_vnd.google-apps.drawingâ: [
âimage_svg+xmlâ,
âimage_pngâ,
âapplication_pdfâ,
âimage_jpegâ
]
}
}
0
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-1 Doc in root of test01 - file owner test01.docx
2018_02_20 13:22:53 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:53 DEBUG : HTTP REQUEST (req 0x13dd8100)
2018_02_20 13:22:53 DEBUG : GET _drive_v3_files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cowners%29%2CnextPageToken&pageSize=1000&q=trashed%3Dfalse+and+%271EuLtoxkP6OETcCdoVNnbbqGVKFPkyilZ%27+in+parents HTTP_1.1
Host: www_googleapis_com
User-Agent: rclone_v1.39-161-gafc963ed
Authorization: XXXX
Accept-Encoding: gzip
2018_02_20 13:22:53 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:22:53 DEBUG : HTTP RESPONSE (req 0x13dd8100)
2018_02_20 13:22:53 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application_json; charset=UTF-8
Date: Tue, 20 Feb 2018 12:22:57 GMT
Expires: Tue, 20 Feb 2018 12:22:57 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
42d
{
âfilesâ: [
{
âidâ: â1VAyEnL6Lu70cFh6MIF_MQPWTenJGcKaaHZTUqWm7fp4â,
ânameâ: âSheet in shared folder tester01 (owned by test01) - file owner test02â,
âmimeTypeâ: âapplication_vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-20T12:21:07.798Zâ,
âmodifiedTimeâ: â2018-02-20T12:21:23.144Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest2â,
âmeâ: false,
âpermissionIdâ: â12821402456939511812â,
âemailAddressâ: âtest2@âŚâ
}
]
},
{
âidâ: â19Fj5bKYQPWtS6dxOr-nt7_GirVgfQiVG8v74DvFtVhsâ,
ânameâ: âSheet in shared folder tester01 (owned by test01) - file owner test01â,
âmimeTypeâ: âapplication_vnd.google-apps.spreadsheetâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:03:08.687Zâ,
âmodifiedTimeâ: â2018-02-20T12:20:48.020Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: true,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
}
]
}
0
2018_02_20 13:22:53 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-1 tester01_Sheet in shared folder tester01 (owned by test01) - file owner test01.xlsx
2018_02_20 13:22:53 DEBUG : Go routines at exit 6
2018_02_20 13:22:53 DEBUG : rclone: Version âv1.39-161-gafc963edâ finishing with parameters [ârcloneâ â-vvâ ââdrive-auth-owner-onlyâ ââdump-bodiesâ âlsâ âUser_Drives:â ââdrive-impersonate=test1@âŚâ]
C:\rclone>
===================================================================================================================================
C:\rclone>rclone ls User_Drives: --drive-impersonate=test2@⌠--drive-auth-owner-only
-1 Doc in root of test02 - file owner test02.docx
C:\rclone>
===
C:\rclone>rclone -vv --drive-auth-owner-only --dump-bodies ls User_Drives: --drive-impersonate=test2@âŚ
2018_02_20 13:23:12 NOTICE: --dump-bodies is obsolete - please use --dump bodies instead
2018_02_20 13:23:12 DEBUG : Using config file from âc:\âŚ\rclone.confâ
2018_02_20 13:23:12 DEBUG : rclone: Version âv1.39-161-gafc963edâ starting with parameters [ârcloneâ â-vvâ ââdrive-auth-owner-onlyâ ââdump-bodiesâ âlsâ âUser_Drives:â ââdrive-impersonate=test2@âŚâ]
2018_02_20 13:23:12 INFO : Google drive root ââ: Modify window is 1ms
2018_02_20 13:23:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:12 DEBUG : HTTP REQUEST (req 0x13c8e080)
2018_02_20 13:23:12 DEBUG : POST _o_oauth2_token HTTP_1.1
Host: accounts.google.com
User-Agent: rclone_v1.39-161-gafc963ed
Content-Length: 859
Content-Type: application_x-www-form-urlencoded
Accept-Encoding: gzip
assertion=âŚ
2018_02_20 13:23:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:23:12 DEBUG : HTTP RESPONSE (req 0x13c8e080)
2018_02_20 13:23:12 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Disposition: attachment; filename=âjson.txtâ; filename*=UTF-8â'json.txt
Content-Type: application_json; charset=utf-8
Date: Tue, 20 Feb 2018 12:23:16 GMT
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Server: ESF
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
f8
{
âaccess_tokenâ : ââŚâ,
âexpires_inâ : 3600,
âtoken_typeâ : âBearerâ
}
0
2018_02_20 13:23:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:23:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:12 DEBUG : HTTP REQUEST (req 0x13cc6100)
2018_02_20 13:23:12 DEBUG : GET _drive_v3_files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cowners%29%2CnextPageToken&pageSize=1000&q=trashed%3Dfalse+and+%27root%27+in+parents HTTP_1.1
Host: www_googleapis_com
User-Agent: rclone_v1.39-161-gafc963ed
Authorization: XXXX
Accept-Encoding: gzip
2018_02_20 13:23:12 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:13 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:23:13 DEBUG : HTTP RESPONSE (req 0x13cc6100)
2018_02_20 13:23:13 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application_json; charset=UTF-8
Date: Tue, 20 Feb 2018 12:23:16 GMT
Expires: Tue, 20 Feb 2018 12:23:16 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
3c1
{
âfilesâ: [
{
âidâ: â1_PAMSISfjtJf2gJzdfteRZG8OWOEY5pZ387Oz4Re0Qsâ,
ânameâ: âDoc in root of test02 - file owner test02â,
âmimeTypeâ: âapplication_vnd.google-apps.documentâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-20T12:20:07.877Zâ,
âmodifiedTimeâ: â2018-02-20T12:20:19.663Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest2â,
âmeâ: true,
âpermissionIdâ: â12821402456939511812â,
âemailAddressâ: âtest2@âŚâ
}
]
},
{
âidâ: â1EuLtoxkP6OETcCdoVNnbbqGVKFPkyilZâ,
ânameâ: âtester01â,
âmimeTypeâ: âapplication_vnd.google-apps.folderâ,
âtrashedâ: false,
âcreatedTimeâ: â2018-02-19T02:03:00.004Zâ,
âmodifiedTimeâ: â2018-02-20T12:19:47.042Zâ,
âownersâ: [
{
âkindâ: âdrive#userâ,
âdisplayNameâ: âtest1â,
âmeâ: false,
âpermissionIdâ: â15101930270770955733â,
âemailAddressâ: âtest1@âŚâ
}
]
}
]
}
0
2018_02_20 13:23:13 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:23:13 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:13 DEBUG : HTTP REQUEST (req 0x13c8e300)
2018_02_20 13:23:13 DEBUG : GET _drive_v3_about?alt=json&fields=exportFormats HTTP_1.1
Host: www_googleapis_com
User-Agent: rclone_v1.39-161-gafc963ed
Authorization: XXXX
Accept-Encoding: gzip
2018_02_20 13:23:13 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018_02_20 13:23:13 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018_02_20 13:23:13 DEBUG : HTTP RESPONSE (req 0x13c8e300)
2018_02_20 13:23:13 DEBUG : HTTP_1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v=â41,39,38,37,35â
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application_json; charset=UTF-8
Date: Tue, 20 Feb 2018 12:23:16 GMT
Expires: Tue, 20 Feb 2018 12:23:16 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
4c0
{
âexportFormatsâ: {
âapplication_vnd.google-apps.documentâ: [
âapplication_rtfâ,
âapplication_vnd.oasis.opendocument.textâ,
âtext_htmlâ,
âapplication_pdfâ,
âapplication_epub+zipâ,
âapplication_zipâ,
âapplication_vnd.openxmlformats-officedocument.wordprocessingml.documentâ,
âtext_plainâ
],
âapplication_vnd.google-apps.spreadsheetâ: [
âapplication_x-vnd.oasis.opendocument.spreadsheetâ,
âtext_tab-separated-valuesâ,
âapplication_pdfâ,
âapplication_vnd.openxmlformats-officedocument.spreadsheetml.sheetâ,
âtext_csvâ,
âapplication_zipâ,
âapplication_vnd.oasis.opendocument.spreadsheetâ
],
âapplication_vnd.google-apps.jamâ: [
âapplication_pdfâ
],
âapplication_vnd.google-apps.scriptâ: [
âapplication_vnd.google-apps.script+jsonâ
],
âapplication_vnd.google-apps.presentationâ: [
âapplication_vnd.oasis.opendocument.presentationâ,
âapplication_pdfâ,
âapplication_vnd.openxmlformats-officedocument.presentationml.presentationâ,
âtext_plainâ
],
âapplication_vnd.google-apps.formâ: [
âapplication_zipâ
],
âapplication_vnd.google-apps.drawingâ: [
âimage_svg+xmlâ,
âimage_pngâ,
âapplication_pdfâ,
âimage_jpegâ
]
}
}
0
2018_02_20 13:23:13 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-1 Doc in root of test02 - file owner test02.docx
2018_02_20 13:23:13 DEBUG : Go routines at exit 6
2018_02_20 13:23:13 DEBUG : rclone: Version âv1.39-161-gafc963edâ finishing with parameters [ârcloneâ â-vvâ ââdrive-auth-owner-onlyâ ââdump-bodiesâ âlsâ âUser_Drives:â ââdrive-impersonate=test2@âŚâ]
C:\rclone>
OK, quite a lot of stuff⌠Had to replace some / and others with _ due to error âtoo many linksâ while pasting the text here.
Thanks for that
What it looks like to me is that when you use the --drive-impersonate user@...
flag then drive is taking that user as the authenticated user so when you supply âdrive-auth-owner-only
you only get files owned by that user.
Is that what you expected?
It would be possible to add another flag to rclone --drive-owner user@gmail.com
which only shows files owned by that email address. Would that help?
Thanks for your quick response! Iâm not sure if I understood everything right. What I would expect:
âdrive-impersonate test01@âŚ
=> Download all files owned by test01 according to the upper half of the screenshot, no matter in which folder (own or shared by another user) they are stored.
âdrive-impersonate test02@âŚ
=> Download all files owned by test02 according to the bottom half of the screenshot, no matter in which folder (own or shared by another user) they are stored.
In this example, the folder tester01 belongs to test01 and is also downloaded by that user with his file in it. But this folder should also be created while downloading the files of test02 with only the file in it belonging to test02.
Is this would you propose with the additional flag? Then YES
I think I see what the problem is now⌠when using user test02
rclone is skipping the tester01
folder completely because it isnât owned by test02
- is that correct?
Does this fix the problem for you?
https://pub.rclone.org/v1.39-170-g3e9d8967-drive-auth-ownerβ/
Simply perfect! Now it works great. THANK YOU!
Great I'll merge that into master in a bit!
I forgot to merge this into master, but have now! See
https://beta.rclone.org/v1.39-175-g25bbc5d2/ (uploaded in 15-30 mins)
And subsequent betas!