Rclone 1.55 with --config /dev/null

Hi,

Since numerous versions, I'm running rclone with --config /dev/null, I can understand it may be considered as "bad".

The 1.55 release note indicates "Config system re-work".
The current documentation : If the location is set to empty string "" or the special value /notfound, or the os null device represented by value NUL on Windows and /dev/null on Unix systems, then rclone will keep the config file in memory only.

I failed to understand what is the new syntax for "no config file". Can someone help me ?

What is the problem you are having with rclone?

unnecessary error message (which don't prevent valid execution)

What is your rclone version (output from rclone version)

rclone v1.55.0

  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.2
  • go/linking: static
  • go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

linux debian buster amd64

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

sftp

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

rclone \
    --config /dev/null \
    sync /local/path/ :sftp:remote_path/ \
    --sftp-host hidden --sftp-port hidden --sftp-user hidden --sftp-pass hidden \
    -v --bwlimit 80k:600k --max-delete 2 --transfers 1 --checkers 4 --size-only

2021/04/07 21:55:12 ERROR : Can't save config "md5sum_command" = "md5sum" for on the fly backend ":sftp"
2021/04/07 21:55:18 ERROR : Failed to save config after 10 tries: Failed to create temp file for new config: open /dev/null804515289: permission denied
2021/04/07 21:55:18 ERROR : Can't save config "sha1sum_command" = "sha1sum" for on the fly backend ":sftp"
2021/04/07 21:55:24 ERROR : Failed to save config after 10 tries: Failed to create temp file for new config: open /dev/null062934686: permission denied

Why "/dev/null804515289" ?

rclone \
    --config "" \
    sync /local/path/ :sftp:remote_path/ \
    --sftp-host hidden --sftp-port hidden --sftp-user hidden --sftp-pass hidden \
    -v --bwlimit 80k:600k --max-delete 2 --transfers 1 --checkers 4 --size-only

2021/04/07 22:01:06 Failed to load config file "/tmp": read /tmp: is a directory

/tmp was the curent directory

rclone \
    --config /notfound \
    sync /local/path/ :sftp:remote_path/ \
    --sftp-host hidden --sftp-port hidden --sftp-user hidden --sftp-pass hidden \
    -v --bwlimit 80k:600k --max-delete 2 --transfers 1 --checkers 4 --size-only

2021/04/07 22:02:23 NOTICE: Config file "/notfound" not found - using defaults
2021/04/07 22:02:23 ERROR : Can't save config "md5sum_command" = "md5sum" for on the fly backend ":sftp"
2021/04/07 22:02:23 ERROR : Can't save config "sha1sum_command" = "sha1sum" for on the fly backend ":sftp"

why "using defaults" ?

The rclone config contents with secrets removed.

empty file

A log from the command with the -vv flag

with /dev/null

2021/04/07 22:32:47 DEBUG : Using config file from "/dev/null"
2021/04/07 22:32:47 INFO  : Starting bandwidth limiter at 80k:600kBytes/s
2021/04/07 22:32:47 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "--config" "/dev/null" "sync" "..."]
2021/04/07 22:32:47 DEBUG : Creating backend with remote "/local/path"
2021/04/07 22:32:47 DEBUG : Creating backend with remote ":sftp:remote_path/"
2021/04/07 22:32:47 DEBUG : :sftp: detected overridden config - adding "{bxU9x}" suffix to name
2021/04/07 22:32:47 DEBUG : sftp://hidden/: New connection 192.168.hidden:48660->hidden to "SSH-2.0-rclone/v1.54.1"
2021/04/07 22:32:48 DEBUG : sftp://hidden/: Using absolute root directory "/remotepath"
2021/04/07 22:32:48 DEBUG : fs cache: renaming cache item ":sftp:remotepath/" to be canonical ":sftp{bxU9x}:remotepath/"
2021/04/07 22:32:48 DEBUG : sftp://hidden/: checking "md5sum" command: "d41d8cd98f00b204e9800998ecf8427e  -"
2021/04/07 22:32:48 DEBUG : sftp://hidden/: checking "sha1sum" command: "da39a3ee5e6b4b0d3255bfef95601890afd80709  -"
2021/04/07 22:32:48 ERROR : Can't save config "md5sum_command" = "md5sum" for on the fly backend ":sftp"
2021/04/07 22:32:48 DEBUG : Saving config "md5sum_command" = "md5sum" in section ":sftp" of the config file
2021/04/07 22:32:53 ERROR : Failed to save config after 10 tries: Failed to create temp file for new config: open /dev/null662956684: permission denied
2021/04/07 22:32:53 ERROR : Can't save config "sha1sum_command" = "sha1sum" for on the fly backend ":sftp"
2021/04/07 22:32:53 DEBUG : Saving config "sha1sum_command" = "sha1sum" in section ":sftp" of the config file
2021/04/07 22:32:58 ERROR : Failed to save config after 10 tries: Failed to create temp file for new config: open /dev/null298753709: permission denied
...

Regards,

Mmm, new features!

I think the last of your examples is working more or less as expected, except for the error messages which it would be nice to suppress. I think the errors are probably only cosmetic though.

The first example is odd and I don't think using the system null device is a good idea.

The second example is a bug.

So I think /noconfig is probably best - does it work for you?

I'll have a go at fixing the oddities tomorrow.

The middle one looks like a bug!

Correct name is /notfound.

1 Like

Created a GitHub issue #5222.

1 Like

Thanks @albertony - will reply on the issue

I agree and I written on the first post 'I can understand it may be considered as "bad".'

Thank you for the time spent to analyse and fix.

1 Like