Rclone sync failed to copy

What is the problem you are having with rclone?

I am trying to sync google shared drive with my local folder and I am receiving an error:
Failed to copy: failed to open source object: open file failed: forbidden to download - check sharing permission
Other files from the same location are synced correctly

Run the command 'rclone version' and share the full output of the command.

rclone v1.57.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-100-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

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

Google Shared Drive

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

rclone sync SD_exo_templates:/ /mnt/gback/backup/shared_drive/SD_exo_templates --log-file=/mnt/gback/backup/results/SD_exo_templates2 -vv

The rclone config contents with secrets removed.

 [SD_exo_templates]
type = drive
client_id = 361862351710-qg9ht5g2pid175u3iemdf9cs8henftld.apps.googleusercontent.com
client_secret = 
scope = drive.readonly
service_account_file = /mnt/disk1/backup/script/gdrivejsonfile.json
shared_with_me = false
team_drive = 0AIPRN66CZZoQUk9PVA
root_folder_id = 

A log from the command with the -vv flag

2022/03/14 15:22:02 ERROR : UMOWY/USŁUGI/AGILE/Agile Contract PL Draft TG.docx: Failed to copy: failed to open source object: open file failed: forbidden to download - check sharing permission
2022/03/14 15:22:02 DEBUG : UMOWY/USŁUGI/AGILE/Copy of 180105_Agile Contract Example.pptx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2022/03/14 15:22:02 DEBUG : UMOWY/USŁUGI/AGILE/Copy of 180105_Agile Contract Example.pptx: Unchanged skipping
2022/03/14 15:22:02 DEBUG : UMOWY/USŁUGI/AGILE/Agile Contract Template PL Draft.docx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2022/03/14 15:22:02 DEBUG : UMOWY/USŁUGI/AGILE/Agile Contract Template PL Draft.docx: Unchanged skipping
2022/03/14 15:22:02 DEBUG : Local file system at /mnt/gback/backup/shared_drive/SD_exo_templates: Waiting for checks to finish
2022/03/14 15:22:02 DEBUG : Local file system at /mnt/gback/backup/shared_drive/SD_exo_templates: Waiting for transfers to finish
2022/03/14 15:22:02 ERROR : Local file system at /mnt/gback/backup/shared_drive/SD_exo_templates: not deleting files as there were IO errors
2022/03/14 15:22:02 ERROR : Local file system at /mnt/gback/backup/shared_drive/SD_exo_templates: not deleting directories as there were IO errors
2022/03/14 15:22:02 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: open file failed: forbidden to download - check sharing permission

2022/03/14 15:22:09 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:               117 / 117, 100%
Elapsed time:        10.7s

2022/03/14 15:22:09 DEBUG : 22 go routines active
2022/03/14 15:22:09 Failed to sync: failed to open source object: open file failed: forbidden to download - check sharing permission

hello and welcome to the forum,

as far as i know,
if the remote is using a service account file, client_id should not be used.

so the issue is with a single file?, UMOWY/USŁUGI/AGILE/Agile Contract PL Draft TG.docx

Hello, thank you for answer!
in this particular case the issue is with this one file.
I have prepared configuration for more shared drive volumes (cloned this configuration with other team_drive ID), some are completing synchronization process without issues, some are returning errors with one or more files, like this case. In general most files are working ok, just getting exceptions like this one.

forbidden to download - check sharing permission

that is the message from gdrive, rclone simply prints it out.
so i would look at the file permissions.

permissions to google shared drive content are the same for all files and folders. Permissions are assigned at shared drive level, not single files

did you remove?
client_id = 361862351710-qg9ht5g2pid175u3iemdf9cs8henftld.apps.googleusercontent.com

do the same files fail each time?
if so, then change the command to rclone copy SD_exo_templates:path/to/filename.ext

for a more in depth rclone log, add something like this, tho can can sensitive info, you might want to redact
--dump=headers --retries=1 --low-level-retries=1 --log-level=DEBUG --log-file=rclone.log
or
--dump=bodies --retries=1 --low-level-retries=1 --log-level=DEBUG --log-file=rclone.log

I found the source of problem. There is an option in sharing settings that limits specific file downloading for users with viewer permissions. Thank you for help!

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