Rclone Sync Failed with "Failed to copy mkdir <dir>: permission denied"

What is the problem you are having with rclone?

I'm using sync to mirror a directory on my Google Drive with a backup mount on my RAID. I'm getting an error that states "Failed to copy: mkdir /data: permission denied". My target for the sync is /data/archive/GBurgDrive. I can copy / mkdir from the same user in my shell to that directory, so I'm not sure why this is failing.

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

rclone v1.65.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-91-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: snap

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)

/usr/bin/rclone -P -vvvvv copy GBurg:GBurg/ /data/archive/GBurgDrive

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[GBurg]
type = drive
client_id = XXX
client_secret = XXX
scope = drive.readonly
token = XXX

A log from the command that you were trying to run with the -vv flag

 /usr/bin/rclone -P -vvvvv copy GBurg:GBurg/ /data/archive/GBurgDrive
2024/01/07 12:18:29 DEBUG : rclone: Version "v1.65.0" starting with parameters ["/snap/rclone/486/bin/rclone" "-P" "-vvvvv" "copy" "GBurg:GBurg/" "/data/archive/GBurgDrive"]
2024/01/07 12:18:29 DEBUG : Creating backend with remote "GBurg:GBurg/"
2024/01/07 12:18:29 DEBUG : Using config file from "/home/jgordon/snap/rclone/486/.config/rclone/rclone.conf"
2024/01/07 12:18:29 DEBUG : Google drive root 'GBurg': 'root_folder_id = 0AL8SOBzOY4U9Uk9PVA' - save this in the config to speed up startup
2024/01/07 12:18:30 DEBUG : fs cache: renaming cache item "GBurg:GBurg/" to be canonical "GBurg:GBurg"
2024/01/07 12:18:30 DEBUG : Creating backend with remote "/data/archive/GBurgDrive"
2024/01/07 12:18:30 DEBUG : Cameo by Alton Brown via cameo.mp4: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Camping checklist.docx: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Soloflex ad.docx: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Tech/Dell C2422HE_verbose_20230815_090332.log: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Tech/FileBot_License_PX37002513.psm: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Tech/LicenseCertificate-A3917587.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Tech/beacon_license.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:30 DEBUG : Tech/spybot_license.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Tickets/printpasspdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Personal/Blah hoooo.docx: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Personal/Christy_WDL.jpg: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Personal/Happy Retirement Jamie!.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Personal/Jamie_WDL.jpg: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Tech/GordonBrooke Infrastructure/Gussy_recovery_key.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/Swamp Castle Contact Information: No export formats found for "application/vnd.google-apps.form"
2024/01/07 12:18:31 DEBUG : Swamp_Castle/IRS_EIN_SWAMPCASTLE.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/SC_Business_License: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/Swamp Castle Business Plan.docx: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/Swampcastle_business_license_2023.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/Swampcastle_renewal_2023.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/WA_DOR_SWAMP_CASTLE_LETTER.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/Washington-Independent-Contractor-Agreement.pdf: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Swamp_Castle/jamiegordon.net.docx: Need to transfer - File not found at Destination
2024/01/07 12:18:31 DEBUG : Local file system at /data/archive/GBurgDrive: File to upload is small (6860 bytes), uploading instead of streaming
2024/01/07 12:18:31 ERROR : Camping checklist.docx.zacomoz4.partial: Failed to copy: mkdir /data: permission denied
2024/01/07 12:18:31 DEBUG : Camping checklist.docx: Updating size of doc after download to 6860
2024/01/07 12:18:31 ERROR : Camping checklist.docx: Failed to copy: mkdir /data: permission denied
<errors continue repeating from here>

Any help is appreciated. Thanks!

Jamie

that is a bit strange, given the the copy operation is a download from gdrive to local?

not sure it will matter, might try --inplace

what are the permissions for that directory?

/data directory perms (the user running the command is the owner)

drwxr-xr-x   9 jgordon jgordon       4096 Jan  7 12:04 data

Same result with --inplace

Jamie

ok, i just noticed that you are using rclone inside a snap.
there are known issues with that setup. can search the forum about that.
or adjust snap permissions as needed.

so i suggest installing it the official way and then should not have the problem.

Thanks. I HATE snaps. More trouble than they are worth-IMO. I should just build it from scratch since the version in Ubuntu apt repo is way old.

Thanks for the eyes.
Jamie

welcome

yes, way old.

https://rclone.org/install/#script-installation
or
given that rclone is a portable app, no install needed, can just download the executable and run it.

I'll try that. Thanks again.

Jamie

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