Opened 6 years ago

Closed 6 years ago

#12834 closed defect (fixed)

config parameter "hardcoded" in in torctl

Reported by: cypherpunks Owned by: hiviah
Priority: Medium Milestone:
Component: Core Tor/RPM packaging Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

RPMs from [1] use an init script [2] that in turn invokes torctl [3].

Trying to configure custom pidfile, log, DataDirectory or user in you config will not work since torctl [3] specifies these parameters on the command line which will overrule your config file options.

Having a look at the running tor process started by the init/torctl script shows:

/usr/bin/tor -f /etc/tor/torrc --pidfile /var/run/tor/tor.pid --log notice file /var/log/tor/tor.log --runasdaemon 1 --datadirectory /var/lib/tor --user _tor

To be able to configure these parameters you would have to modify
/usr/bin/torctl
which will be overwritten with the next update since it is no config file [4].

I would suggest to migrate to systemd startup altogether. You could simply reuse fedora's file [5]?

[1] https://deb.torproject.org/torproject.org/rpm/
[2] https://gitweb.torproject.org/user/hiviah/rpm-tor.git/blob/HEAD:/contrib/tor.sh.in
[3] https://gitweb.torproject.org/user/hiviah/rpm-tor.git/blob/HEAD:/contrib/torctl.in
[4] https://gitweb.torproject.org/user/hiviah/rpm-tor.git/blob/HEAD:/tor.spec.in#l282
[5] http://pkgs.fedoraproject.org/cgit/tor.git/tree/tor.systemd.service

Child Tickets

Change History (2)

comment:1 Changed 6 years ago by hiviah

Owner: changed from marlowe to hiviah
Status: newassigned

This dates probably back to times when there was no --defaults-torrc option. I have a branch that was trying to fix it, I'll try to apply the changes to see whether it works: https://gitweb.torproject.org/user/hiviah/rpm-tor.git/shortlog/refs/heads/unfinished-rpm-defaultsrc

comment:2 Changed 6 years ago by hiviah

Resolution: fixed
Status: assignedclosed

Now fixed in tor-testing repo with tor version 0.2.5.6. Packages are already uploaded.

Note: See TracTickets for help on using tickets.