Opened 9 months ago

Last modified 7 months ago

#27192 reopened defect

Perform --verify-config before reloading tor

Reported by: traumschule Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When tor is SIGHUPed and the log file can't be written or ownership or permissions of hidden service dir is wrong, tor dies.

Instead call tor --verify-config before actually reloading tor to avoid this.

Child Tickets

Change History (5)

comment:1 Changed 9 months ago by teor

I think this might be a duplicate of #21818. What do you think?

comment:2 Changed 9 months ago by traumschule

Parent ID: #21818

comment:3 Changed 9 months ago by traumschule

Resolution: duplicate
Status: newclosed

comment:4 Changed 7 months ago by traumschule

Parent ID: #21818
Resolution: duplicate
Status: closedreopened

Reopening since #21818 has been closed for the unrelated #8195 and #17873.
Would it make sense to show an error instead of dying to inform the operator to fix the environment and try again?

comment:5 Changed 7 months ago by traumschule

Just reproduced it with Tor version 0.3.6.0-alpha-dev:

Oct 31 19:58:34.000 [notice] {GENERAL} Received reload signal (hup). Reloading config and resetting internal state.
Oct 31 19:58:34.000 [notice] {CONFIG} Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Oct 31 19:58:34.000 [notice] {CONFIG} Read configuration file "/etc/tor/torrc".
Oct 31 19:58:34.000 [warn] {CONFIG} Couldn't open file for 'Log notice file /var/log/tor1/tor.log': No such file or directory
Oct 31 19:58:34.000 [warn] {CONFIG} Failed to parse/validate config: Failed to init Log options. See logs for details.
Oct 31 19:58:34.000 [err] {CONFIG} Reading config failed--see warnings above. For usage, try -h.
Oct 31 19:58:34.000 [warn] {CONFIG} Restart failed (config error?). Exiting.
Note: See TracTickets for help on using tickets.