Authorization error with --rc-htpasswd via remote control.
If you use --rc-user and --rc-pass, everything works fine.
At the same time, running the gui using rcd --rc-htpasswd passes without errors
What is your rclone version (output from rclone version)
rclone: Version "v1.55.1"
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10, 64 bit
The command you were trying to run (eg rclone copy /tmp remote:tmp)
It is not entirely clear what does clearing the browser cache have to do with it?
The rclone GUI works fine, both when using rcd --rc-htpasswd, and when running with --rc-user and --rc-pass. The problem is running remote control rc --rc-htpasswd when working with an already running rclone daemon, but if I use authorization with rc --rc-user --rc-pass, then everything works fine.
Ok I cleared the cookies and browser cache, it didn't help.
I installed a clean Window10 x64 on virtualbox, run the same sequence of commands and get the same error, I understand that the cache and cookies should not have affected it, since the system is initially clean?
Maybe I incorrectly explained the sequence of my actions:
Created a bat file
Wrote the commands in it:
1. set RCLONE_CONFIG_PASS=password from the config
2. start /b rclone rcd --rc-web-gui-no-open-browser --rc-htpasswd=\rclone\webgui\.htpasswd --rc-serve --rc-files=\rclone\webgui\current\build
3. start /b rclone rc --rc-htpasswd=\rclone\webgui\.htpasswd mount/mount fs=test: mountPoint=x:
Here is command 3 and gives an authorization error using --rc-htpasswd and the rc command does not work, but if in command 3, replace --rc-htpasswd=\rclone\webgui.htpasswd on --rc-user=username --rc-pass=user password (this data is the same as in .htpasswd) then everything works fine.
Where is my mistake? I just don't want to keep my username and password publicly available in a bat file. Maybe there is an option to use the RCLONE_HTPASSWD environment variable?
For command 3 you need to supply a username and password from the htpassword file as it is connecting to the rclone rcd. So using those credentials so using --rc-user/--rc-pass is what you need to do.
I understand correctly, I can't run rcd --rc-htpasswd=\rclone\webgui.htpasswd first and then use the same --rc-htpasswd=\rclone\webgui.htpasswd with rc, but only via --rc-user`/ ' --rc-pass?
one way is to use environment variables.
i have a python script that creates environment variables and starts a new process with those environment variables to run rclone.
When you run it like that, Python will get the password from the environment variable and then pass the password raw as an argument to rclone (as an element of argv). So the password will still be visible in the process list.
not an expert but the password is not passed as part of argv, as it is an environment variable.
i just checked again.
using task manager, the password is not visible on the command line.
sure, process explorer from sysinternals is able to display environment variables of a running app.
that's another reason why i suggested that you start a new topic.
so we do not have to guess about your setup.
give your new topic a good title, we have many linux experts.