Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14018 closed defect (implemented)

Complain if relative paths are used in torrc options

Reported by: rl1987 Owned by: rl1987
Priority: Medium Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Some torrc options point to files or directories, e.g. HiddenServiceDir, PidFile and others. Most of these are relative with regards to current working directory of Tor instance. This is confusing, since user might be expecting them to be relative to DataDir (because manpage fails to document the exact behaviour).

Log a warning whenever relative path is used in torrc.

Child Tickets

Change History (7)

comment:1 Changed 5 years ago by rl1987

Owner: set to rl1987
Status: newaccepted

comment:2 Changed 5 years ago by cypherpunks

I recently ran into this issue. With PidFile containing a filename (without a path) it has different results depending on whether it is running as a daemon. When in daemon mode, the pidfile is placed in ~/.tor/, otherwise it is placed in the current working directory. The Log option always places the file (without a path) in the current working directory.

comment:3 Changed 4 years ago by rl1987

Status: acceptedneeds_review

comment:4 Changed 4 years ago by nickm

Milestone: Tor: 0.2.???Tor: 0.2.7.x-final

If there's a patch, we can look at it for 0.2.7

comment:5 Changed 4 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

looks good now, squashing and merging.

comment:6 Changed 4 years ago by cypherpunks

The patch causes a Tor instance with default settings to give a warning on the PortForwardingHelper option. This is caused by the default value being a relative path.

comment:7 Changed 4 years ago by nickm

Thanks! Should be fixed in e5e2644f235eae698378427f0b12c9e3b0786d4a

Note: See TracTickets for help on using tickets.