Webdav: Authentication doesn't work with "on-the-fly" backend


#1

I’m trying to use new dynamic backend feature.

Assume such config file:
[mail]
type = webdav
url = https://webdav.acme.com
vendor = other
user = foo
pass = bar

This command works fine:
$ rclone ls mail:

But this one fails:
$ rclone ls
–webdav-vendor other
–webdav-url https://webdav.acme.com
–webdav-user foo
–webdav-pass bar
:webdav:

2018/11/16 15:21:58 ERROR : : error listing: couldn’t list files: 401 Unauthorized
2018/11/16 15:21:58 Failed to ls: couldn’t list files: 401 Unauthorized

I’ve basically copied all values from config file into command line, including obfuscated password, but it looks like rclone doesn’t pass them down to backend.


#2

Does the password have special chars or something that needs to be in quotes ?


#3

I’m copying already obfuscated password from config file, since that what I’ve understood from other issues on GH and SO. But yeah, original password contains special chars.


#4

Have you tried using ’ or " to enclose the password on the command line? I can’t replicate what you are doing though since I don’t know what chars are in there.

GH - github?
SO - ?


#5

Yes, I did, but to clarify: I put in CLI obscrured password “hash” that has no special characters. One that stored in config file or produced via “rclone obscure mypass”.

SO - StackOverflow.


#6

You can also try to use the RCLONE_CONFIG_PASS or RCLONE_WEBDAV_PASS in your script to see if that works as well rather than passing on the command line.


#7

Both of those give no different result compared to CLI argument.

Also one thing i’ve noticed: rclone obscure 123 gives different “hash” each time i use it.


#8

I think you can use this:


#9

Thanks for your suggestion, but whole idea of dynamic backend is to not create remotes in config file an just use one-liner…


#10

What is stopping you from using something like that in a one liner?


#11

Ah looks like this isn’t being parsed properly…

Try this

https://beta.rclone.org/branch/v1.44-094-g8c8dcdd5-fix-webdav-auth-beta/ (uploaded in 15-30 mins)


#12

Works like charm, thanks!


#13

Thanks for testing. I’ve merged that into the latest beta and the fix will be in v1.45.