Trying to make rclone.conf available to all users on Linux

What is the problem you are having with rclone?

I have created a working rclone.conf file on a Linux CentOS derivative for use with Wasabi. I did so as regular user and it works as that user. Now I need to run rclone as 'root' from crontab but I keep getting the error: Config file "/root/.config/rclone/rclone.conf"
I've tried chmod of the conf file to allow rw access to all
I've tried setting RCLONE_CONFIG equal to the path and exporting it:
RCLONE_CONFIG=/home/ITAdmin/.config/rclone/rclone.conf
export RCLONE_CONFIG

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

- os/version: centos 7.9.2009 (64 bit)
- os/kernel: 3.10.0-1160.88.1.el7.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.1
- go/linking: static
- go/tags: none```

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

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

rclone copy --dry-run /home/bionano/access/web/Server/databaseFiles/ -P -v --skip-links --log-file /scripts/output/copylog.txt wasabi2:bionanohome1/bionano/databaseFiles/


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

[wasabi2]
type = s3
provider = Wasabi
access_key_id = XXX
secret_access_key = XXX
endpoint = s3.us-west-1.wasabisys.com```

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

2023/10/10 09:29:12 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "-vv" "copy" "--dry-run" "/home/bionano/access/web/Server/databaseFiles/" "-P" "-v" "--skip-links" "--log-file" "/scripts/output/copylog.txt" "wasabi2:bionanohome1/bionano/databaseFiles/"]
2023/10/10 09:29:12 DEBUG : Creating backend with remote "/home/bionano/access/web/Server/databaseFiles/"
2023/10/10 09:29:12 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2023/10/10 09:29:12 DEBUG : local: detected overridden config - adding "{HK82T}" suffix to name
2023/10/10 09:29:12 DEBUG : fs cache: renaming cache item "/home/bionano/access/web/Server/databaseFiles/" to be canonical "local{HK82T}:/home/bionano/access/web/Server/databaseFiles"
2023/10/10 09:29:12 DEBUG : Creating backend with remote "wasabi2:bionanohome1/bionano/databaseFiles/"
2023/10/10 09:29:12 Failed to create file system for "wasabi2:bionanohome1/bionano/databaseFiles/": didn't find section in config file```

"Trying to make rclone.conf available to all users on Linux"

then put the rclone.conf in a location available to all users
RCLONE_CONFIG=/rclone/rclone.conf
or
--config=/rclone/rclone.conf

I can certainly move the .conf file to a more "public" directory. Once done, could I then add "--config=" to the command execution? Like
rclone copy --config=/rclone/rclone.conf --dry-run /home/bionano/access/web/Server/databaseFiles/ -P -v --skip-links --log-file /scripts/output/copylog.txt wasabi2:bionanohome1/bionano/databaseFiles/
(using your path example)?

that is correct,

Or you can just make a global environment variable and point to that by default.

RCLONE_CONFIG=/opt/rclone/rclone.conf

I don't append that anywhere as I'm lazy.

Thank you all for your help! The suggestions have resolved my problem.

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