What is the problem you are having with rclone?
When running rClone via launchd (macOS) it doesn't have access to the local file system. I've tried both from a user account (plist in /Users//Library/LaunchAgents) and root (plist in /Library/LaunchAgents) with the same result. The same bash script run directly from Terminal works fine. I've also run a simple script that creates a folder via launchd and it ran fine. The issue seems to be the combination of rClone & launchd.
Run the command 'rclone version' and share the full output of the command.
rclone v1.68.0
- os/version: darwin 13.7 (64 bit)
- os/kernel: 22.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.23.1
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Google Drive (Shared Drives)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Bash Script:
#! /bin/bash
# RClone Config file
RCLONE_CONFIG=/Users/bryan/.config/rclone/rclone.conf
export RCLONE_CONFIG
/usr/local/bin/rclone sync G-Projects: /Volumes/Expansion/Backup/Projects -v -P --log-file /Users/bryan/bin/LLA-Backup" $(date '+%y.%m.%d').log" --exclude=*.{bpn,lck}
LaunchAgent plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.test</string>
<key>ProgramArguments</key>
<array>
<string>/Users/bryan/bin/lla-backup.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>16</integer>
<key>Minute</key>
<integer>55</integer>
</dict>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/bryan/bin/output.log</string>
<key>StandardErrorPath</key>
<string>/Users/bryan/bin/error.log</string>
</dict>
</plist>
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[G-Projects]
type = drive
scope = drive.readonly
token = XXX
team_drive = XXX
root_folder_id =
A log from the command that you were trying to run with the -vv
flag
<snip>
2024/09/25 17:02:49 ERROR : 355 Taft St/2024-03-06 18-24.pdf: Failed to copy: open /Volumes/Expansion/Backup/Projects/355 Taft St/2024-03-06 18-24.pdf.5bae4eb1.partial: operation not permitted
2024/09/25 17:02:49 ERROR : .DS_Store 2: Failed to copy: open /Volumes/Expansion/Backup/Projects/.DS_Store 2.7a832fd1.partial: operation not permitted
2024/09/25 17:02:49 ERROR : 355 Taft St/355 TAFT ST. AS-BUILT DRAWING .pdf: Failed to copy: open /Volumes/Expansion/Backup/Projects/355 Taft St/355 TAFT ST. AS-BUILT DRAWING .pdf.d374dbf7.partial: operation not permitted
2024/09/25 17:02:49 ERROR : Byrd-Mallari/Byrd-Mallari EXISTING.pdf: Failed to copy: open /Volumes/Expansion/Backup/Projects/Byrd-Mallari/Byrd-Mallari EXISTING.pdf.b61525e4.partial: operation not permitted
2024/09/25 17:02:50 ERROR : 355 Taft St/355 TAFT ST. AS-BUILT DRAWING.pdf: Failed to copy: open /Volumes/Expansion/Backup/Projects/355 Taft St/355 TAFT ST. AS-BUILT DRAWING.pdf.f0c320db.partial: operation not permitted
<snip>