How to run rclone using crontab of www-data?

I have configured crontab of www-data user to run rclone copy.

It cannot work right now because of this

NOTICE: Config file "/var/www/.rclone.conf" not found - using defaults
Failed to create file system for "FTP_Labels:/": didn't find section in config file

I installed rclone using root user.

How can I circumvent this problem? I'd like to use crontab of www-data because in this crontab there are all of syncs of this damn old server

I tried to dump configuration from root and save this configuration dumper into a file. Then i tried to use this file as config but rclone warn me

Failed to load config file ".. cut... /rclone_config": could not parse line: {

rclone dumps to json but json is not right format of config file.



I found solution

From root user I found where is the config file located

rclone config file

I copy pasted relevant config into a new file under my project

Then i changed ownership of new file as www-data:www-data

Then I pointed crontabbed rclone command to his file to be used as config.

all works

You can just use --config and point to the same location if you have multiple users.

      --config string                        Config file. (default "$HOME/.config/rclone/rclone.conf")

I use my config in /opt/rclone/rclone.conf as an example.

1 Like

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