Closed toddrob99 closed 1 year ago
Same situation. If the settings.json file is edited and it contains the user name and password, the user gets erased. Don't know about the password, since i can't authenticate at that point.
If you look at @toddrob99 's log, you will see that it says: Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to
and then nothing. That's exactly what it is setting the user name to...nothing.
btw, @toddrob99 , your log did show me something i didn't know: as of this version, they would like the transmission-home directory to be under /config and not under /data. Thanks for that. :) I have now moved it to the new location
btw, @toddrob99 , your log did show me something i didn't know: as of this version, they would like the transmission-home directory to be under /config and not under /data. Thanks for that. :) I have now moved it to the new location
I haven't done anything with that yet. I think I just need to move my transmission-home
folder inside my folder that's mapped to /config
and remove the /data/transmission-home
volume mapping. It's not clear to me if I also have to set a TRANSMISSION_HOME
environment variable to /config/transmission-home
or if that will be implied. I haven't taken the time to do it and see.
Is there a way to stop the container from generating these '*-credentials.txt' files??? Since last week's breaking changes (or maybe it was because I switched to using '/config'?), I noticed that 'openvpn-credentials.txt' and 'transmission-credentials.txt' are being creating in my main docker directory. These files show user/passwords in plaintext. This wasn't happening before. I set my rpc and openvpn logins in environment variables and I don't use docker secrets. Why and when did the container start dumping plaintext login files? I don't want my passwords stored by the container this way! :angry:
Something to note while this is being worked on is the permissions for the two password files are not optimal. They get generated (at least on my machine) as group and everyone readable, which isn't good, whereas the dht, settings, and log files aren't group and everyone readable, which might be by design or could be a mistake. If I modify the permissions manually they get re-written at some point.
The log file even warns about the password files being readable, which is strange because they're generated that way by the app.
A bit about the current behaviour:
openvpn/start.sh
always erases the content of /config/transmission-credentials.txt
with what is currently set in the environment variables (it was already the case pre #2321). This file is used by various scripts (scripts/route-pre-down.sh
, openvpn/pia/update-port.sh
) and isn't all that new (https://github.com/haugene/docker-transmission-openvpn/commit/f7a7c2d4b47016787b33111cb78582f9d2276b38).transmission/start.sh
invokes transmission/updateSettings.py
which loads environment variables that relate to transmission settings and inject them into the settings.json
. As part of #2142 in January last year, the creation of the environment variables TRANSMISSION_RPC_USERNAME
and TRANSMISSION_RPC_PASSWORD
is forced through the dockerfile
. This means that now, every time transmission/updateSettings.py
those two variables will always be set (even to an empty string) therefore updateSettings.py
will always update the username and password to the environment variables. (NB: A possible better behaviour would have been checking whether the variable exists rather than forcing its existence)rpc_creds
and transmission-credentials.txt
are identical, skipping the environment variable loading)Overall, to my knowledge, it has not been the case that environment variables could "not be set" like @toddrob99 suggests. It would indeed have a working settings.json
(at least before TRANSMISSION_RPC_USERNAME
and TRANSMISSION_RPC_PASSWORD
were forced in the Dockerfile), but transmission-credentials.txt
would have been erased, leading to route-pre-down.sh
and pia/update-port.sh
to fail (albeit it might not be noticeable that those script would fail.
To @myna-me's point, any direct edit to settings.json
will always be erased (due to the #2142/updateSettings.py
interaction).
For @jmrushing, indeed the creds are stored in the config volume, this could/should be easily solved by replacing the paths to non volume paths.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If the current behaviour where the rpc-username and rpc-password params in settings.json are overwritten is as intended then this should at least be described in the docs. Now you have a selection of params that can/should be changed in that file and they are persistent and another selection of params that are not.
In my case I removed all transmission environment variables thinking they can all be set through the settings file directly now.
Ideally those params shouldn't be overwritten with nothing if no environment variables are provided to begin with, to prevent the unpredictable behaviour.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Don't close it yet as it remains an issue.
Feel free to re-open this issue if you think it deserves another look.
How I hate those bots @Forage . Of course it deserves another look - rpc working but allowing an empty logon is not a sane behaviour. Let's at least disable rpc as a default...
Is there a pinned issue for this?
Is there an existing or similar issue/discussion for this?
Is there any comment in the documentation for this?
Is this related to a provider?
Are you using the latest release?
Have you tried using the dev branch latest?
Docker run config used
Current Behavior
Discussion in #2386
After upgrading to the latest version, rpc credentials are wiped out if not included in the container's environment variables or docker secrets. Logging in with blank username/password works, but previously-stored credentials do not.
Previously, I set the username/password via environment variables and they were written to transmission-credentials.txt, and then removed the environment variables to avoid having my password in the docker-compose.yml file. The values in transmission-credentials.txt would persist across container restarts/recreations.
It appears the logic introduced in #2321 to support docker secrets has broken this scenario, and the values in transmission-credentials.txt are wiped out if not still defined in environment variables.
Expected Behavior
Values in transmission-credentials.txt should not be cleared out upon container start if no credentials are defined in environment variables or docker secrets.
How have you tried to solve the problem?
Tested by adding rpc username/password back to environment variables and confirming that works. Then removed environment variables and observed transmission-credentials.txt was cleared out upon container restart. Found #2321 and reviewed the logic--it appears pre-existing values in transmission-credentials.txt are not considered.
Log output
HW/SW Environment
Anything else?
No response