Rclone configuration

What is the problem you are having with rclone?

mac m1: I get permission denied when it tries to write the configuration into the .config directory
(probably because this directory is a system diectory and nobody is allowed to write in it.

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

./rclone version
rclone v1.60.0
- os/version: darwin 13.0 (64 bit)
- os/kernel: 22.1.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.19.2
- go/linking: dynamic
- go/tags: cmount

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

any

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

./rclone config 

The rclone config contents with secrets removed.

grrr... that's just the point

A log from the command with the -vv flag

Paste  log here

Hi Marcelloh,

You can place the config file somewhere else using --config=/some/folder/rclone.config

More info about the placement of config files here:
https://rclone.org/docs/#config-config-file

Rclone shouldn't have choosen a a system directory for its config.

What user are you running rclone as?

What is the output of

rclone config file

I'm running it as myself. (I am admin of my machine, but the .config directory if not for users, it's for system only)

./rclone config file
/Users/marcelhuijkman/.rclone.conf

but I've got it working by adding --config=./rclone.config behind it (so it is in the same directory as rclone itself)

Hmm, we should probably fix this.

Are users on macOS no longer allowed to write dot files to their home directory?

Where are they supposed to go?

That's not a normal Mac behavior as something is done differently.

etexter@Mac-mini ~ % rclone config file
Configuration file is stored at:
/Users/etexter/.config/rclone/rclone.conf
etexter@Mac-mini ~ % rclone about GD:
2022/10/26 07:35:28 Failed to create file system for "GD:": didn't find section in config file
etexter@Mac-mini ~ % rclone about TEST:
Total:   16 GiB
Used:    1.902 GiB
Free:    10.814 GiB
Trashed: 512.366 MiB
Other:   3.284 GiB

Config file

rclone version
rclone v1.60.0
- os/version: darwin 13.0 (64 bit)
- os/kernel: 22.1.0 (arm64)
- os/type: darwin
- os/arch: arm64
- go/version: go1.19.2
- go/linking: dynamic
- go/tags: cmount

I just reinstalled my Mac for Ventura so this is a fresh install this mornig.

etexter@Mac-mini ~ % rclone config
2022/10/26 07:34:56 NOTICE: Config file "/Users/etexter/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote

It always writes to User/.config/rclone

If there was a config file there already somehow then rclone would use it.

I suspect

cd
mkdir -p .config/rclone/
mv .rclone.conf .config/rclone/rclone.conf

Should fix the problem.

I'd want to know how/why it's pointing to the other spot though as that would fix it, but not really explain the cause.

That's something odd and being overriden.

So the output from here would be helpful as mine is as well:

clone config file -vv
2022/10/26 17:34:17 DEBUG : Setting --config "/opt/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/opt/rclone/rclone.conf"
2022/10/26 17:34:17 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone" "config" "file" "-vv"]
Configuration file is stored at:
/opt/rclone/rclone.conf
2022/10/26 17:34:17 DEBUG : rclone: Version "v1.60.0" finishing with parameters ["rclone" "config" "file" "-vv"]
felix@gemini:/opt/homescripts$

mkdir -p .config/rclone/
mkdir: .config/rclone: Permission denied

You neglected the 'cd' part to get to your home directory.

etexter@Earls-Mac-mini ~ % cd
etexter@Earls-Mac-mini ~ % pwd
/Users/etexter
etexter@Earls-Mac-mini ~ % mkdir -p .config/rclone/

Run that and share the full output.

No I didn't
~ % pwd
/Users/[here is my username]

[here is my username]@[here is my full name]-MacBook-Pro ~ % mkdir -p .config/rclone/

mkdir: .config/rclone: Permission denied

As we can't see your screen, if you don't share it, it didn't happen sadly.

That means you ran this as root or did something odd.

cd ~/.config
ls -al

Share the output.

ls -al
total 0
drwxr-xr-x 2 root staff 64 Oct 26 08:29 .
drwxr-x---+ 38 [myusername] staff 1216 Oct 27 13:18 ..

Is that the same user you are running the command as?

id should be the same owner as is running the command.

etexter@Earls-Mac-mini .config % id
uid=501(etexter) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)
etexter@Earls-Mac-mini .config % ls -al
total 0
drwxr-xr-x@  4 etexter  staff  128 Oct 26 07:34 .
drwxr-x---+ 21 etexter  staff  672 Oct 27 07:49 ..
drwxr-xr-x@  3 etexter  staff   96 Oct 25 07:46 iterm2
drwxr-xr-x@  3 etexter  staff   96 Oct 26 07:46 rclone

yes same owner.
When I do get info (from that .config folder) within finder
I can see that system has r/w access and group "staff" only has read access.
Perhaps this changes in MacOS Ventura... idk.
(It was working on my other Macbook before)

Ventura doesn't change this as I'm using that on a fresh install.

etexter@Earls-Mac-mini ~ % cd
etexter@Earls-Mac-mini ~ % pwd
/Users/etexter
etexter@Earls-Mac-mini ~ % ls -al | grep .config
drwxr-xr-x@  4 etexter  staff   128 Oct 26 07:34 .config
etexter@Earls-Mac-mini ~ %

Run that and share the output.

ls -al | grep .config

drwxr-xr-x   2 root            staff     64 Oct 26 08:29 .config
-rw-r--r--   1 [myusername]  staff    250 Oct 19 14:22 .gitconfig

You've done something to make it owned by root so you'd want to fix that to your user name.

I've done nothing. It's a new macbook. Have no clue at all.

I'm not saying you've done something in a malicious fashion as I'm just saying you've executed something as root in your user's home directory creating the problem.

That shows what the problem is as i'm assuming/fairly confident, you ran some rclone command as root creating the issue as on a fresh install, that .config isn't there and used for rclone.

To fix it, change the ownership of that .config to your user or remove it and recreate your config.