Home | News | Download | Packages | Forum | Wiki | Github

Reloading Tor has no permission to read configuration file


I ran

sudo sv reload tor

which caused the followewing output in the logs

Aug 09 21:15:42.000 [notice] Heartbeat: Tor’s uptime is 19 days 5:56 hours, with 569 circuits open. I’ve sent 181.14 GB and received 179.70 GB.
Aug 09 21:15:42.000 [notice] Circuit handshake stats since last time: 1397/1821 TAP, 130822/592224 NTor.
Aug 09 21:15:42.000 [notice] Since startup, we have initiated 0 v1 connections, 0 v2 connections, 0 v3 connections, and 411349 v4 connections; and received 1211 v1 connections, 6780 v2 connections, 15303 v3 connections, and 576283 v4 connections.
Aug 09 23:22:24.000 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Aug 09 23:22:24.000 [warn] Could not open “/etc/tor/torrc”: Permission denied
Aug 09 23:22:24.000 [notice] Configuration file “/etc/tor/torrc” not present, using reasonable defaults.
Aug 09 23:22:24.000 [warn] Couldn’t find $HOME environment variable while expanding “~/.tor”; defaulting to “”.
Aug 09 23:22:24.000 [warn] Default DataDirectory is “~/.tor”. This expands to “/.tor”, which is probably not what you want. Using “/var/tor” instead
Aug 09 23:22:24.000 [warn] Failed to parse/validate config: While Tor is running, changing DataDirectory ("/var/lib/tor"->"/var/tor") is not allowed.
Aug 09 23:22:24.000 [err] Reading config failed–see warnings above. For usage, try -h.
Aug 09 23:22:24.000 [warn] Restart failed (config error?). Exiting.
Aug 09 23:22:30.000 [notice] Tor (git-c33db290a9d8d0f9) opening log file.
Aug 09 23:22:30.235 [notice] Tor (git-c33db290a9d8d0f9) running on Linux with Libevent 2.1.8-stable, OpenSSL LibreSSL 2.5.5 and Zlib 1.2.11.
Aug 09 23:22:30.236 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Aug 09 23:22:30.237 [notice] Read configuration file “/etc/tor/torrc”.
Aug 09 23:22:30.294 [notice] Based on detected system memory, MaxMemInQueues is set to 325 MB. You can override this by setting MaxMemInQueues by hand.
Aug 09 23:22:30.311 [notice] Opening OR listener on
Aug 09 23:22:30.311 [notice] Opening Directory listener on
Aug 09 23:22:30.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Aug 09 23:22:34.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Aug 09 23:22:36.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
Aug 09 23:22:36.000 [warn] eventdns: Unable to parse nameserver address [cut]
Aug 09 23:22:44.000 [notice] Your Tor server’s identity key fingerprint is [cut]
Aug 09 23:22:44.000 [notice] Bootstrapped 0%: Starting
Aug 09 23:29:01.000 [notice] Starting with guard context "default"
Aug 09 23:29:02.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Aug 09 23:29:04.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Aug 09 23:29:06.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Aug 09 23:29:08.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Aug 09 23:29:08.000 [notice] Bootstrapped 100%: Done
Aug 09 23:29:16.000 [notice] Guessed our IP address as [cut]
Aug 09 23:29:23.000 [notice] Self-testing indicates your DirPort is reachable from the outside. Excellent.
Aug 09 23:29:28.000 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
Aug 09 23:30:32.000 [notice] Performing bandwidth self-test…done.

It appears /etc/tor/torrc can’t be read, then Tor restarts and goes through the regular bootstrapping as if I restarted the service. I wish to reload the configuration only and not restart the service, so it appears to be a bug.

Is this indeed a bug and if so how do I solve it or where do I report it? If it’s a bug I figure it’d be a bug in the runit service script, but I don’t have the knowledge to fix it or anything.

Any help would be appreciated.

I use the image of void for raspberry pi. I reloaded Tor version and when it restarted it started