avpnusr / torprivoxy

Tor and Privoxy in docker container
26 stars 6 forks source link

Failed to parse/validate config: Couldn't create private data directory "//.tor" #16

Closed danbuntu closed 2 years ago

danbuntu commented 2 years ago

Hello

I've set the --user ids to my user and group id using: id -u username id -g username

When I then start the container I am getting:

Feb 25 08:37:45.712 [notice] Read configuration file "/etc/service/tor/./torrc".
Feb 25 08:37:45.715 [warn] You specified a public address '0.0.0.0:9050' for SocksPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Feb 25 08:37:45.715 [notice] Opening Socks listener on 0.0.0.0:9050
Feb 25 08:37:45.715 [notice] Opened Socks listener connection (ready) on 0.0.0.0:9050
Feb 25 08:37:45.715 [warn] Error creating directory //.tor: Permission denied
Feb 25 08:37:45.715 [notice] Closing partially-constructed Socks listener connection (ready) on 0.0.0.0:9050
Feb 25 08:37:45.715 [warn] Failed to parse/validate config: Couldn't create private data directory "//.tor"
Feb 25 08:37:45.715 [err] Reading config failed--see warnings above.
avpnusr commented 2 years ago

Hey @danbuntu thanks for bringing this up!

You are right, that setting in the readme is a relict from an earlier version - I removed it now. At some point I switched to run the tor-process in the container as non-root-user by default. Therefore this setting is irrelevant and causes this error.

You should be fine, to start the container without the --user switch in the command.

If you have a specific need, that the process in the container needs to run at a specified UID/GID, let me know, so I will try to implement this in a future version.

Regards

danbuntu commented 2 years ago

Awesome that sorted it. Thank you