Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#3774 closed defect (not a bug)

ControlSocket file not honored in tor configuration

Reported by: cypherpunks Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.2.30-rc
Severity: Keywords: tor-client
Cc: weasel, ioerror Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I added the following line to my /etc/tor/torrc:

ControlSocket /var/run/tor/control2

This should set the control socket port to the specified file. However, both the listed file and /var/run/tor/control are opened.

Starting tor daemon: tor...
Aug 21 10:51:19.650 [notice] Tor v0.2.2.31-rc (git-b7b96993aea7e5d3). This is experimental software. Do not rely on it for strong anonymity. (Running on Linux i686)
Aug 21 10:51:19.665 [notice] Initialized libevent version 1.4.13-stable using method epoll. Good.
Aug 21 10:51:19.666 [notice] Opening Socks listener on 127.0.0.1:9050
Aug 21 10:51:19.680 [notice] Opening Control listener on /var/run/tor/control
Aug 21 10:51:19.680 [notice] Opening Control listener on /var/run/tor/control2
done.

Above logs are from an Ubuntu 11.04 install.

Child Tickets

Change History (16)

comment:1 Changed 8 years ago by Sebastian

Cc: weasel ioerror added
Component: - Select a componentTor Client

I think this is probably a debian/ubuntu packaging bug. weasel?

comment:2 in reply to:  1 Changed 8 years ago by weasel

Replying to Sebastian:

I think this is probably a debian/ubuntu packaging bug. weasel?

Not a debian packaging bug.

If anything it is a limitation in tor, that it does not allow you to unset previously set multi value config options.

Note that having a .d style config directory would solve this issue too, as the default config could then just be put in a file there instead of in the tor binary.

comment:3 Changed 8 years ago by arma

See https://trac.torproject.org/projects/tor/ticket/1922#comment:7 for the same issue, plus links to (not very fun) suggestions on how to fix.

comment:4 Changed 8 years ago by arma

That said, perhaps debian's patch to Tor should only add its controlsocket if there isn't another one defined?

I'm not sure which behavior would confuse more users.

Also, I can't find the debian patch that does it. I expected to find it in https://gitweb.torproject.org/debian/tor.git/tree/HEAD:/debian/patches
Where should I be looking?

comment:5 in reply to:  4 Changed 8 years ago by arma

Replying to arma:

I can't find the debian patch that does it. I expected to find it in https://gitweb.torproject.org/debian/tor.git/tree/HEAD:/debian/patches
Where should I be looking?

https://gitweb.torproject.org/debian/tor.git/blob_plain/refs/tags/debian-tor-0.2.2.31-rc-1:/debian/patches/06_add_compile_time_defaults.dpatch

I guess it isn't in the 0.2.3.x branch yet. Or in "master", whatever that is.

comment:6 in reply to:  4 Changed 8 years ago by Sebastian

Replying to arma:

That said, perhaps debian's patch to Tor should only add its controlsocket if there isn't another one defined?

That's why I said it might be a debian bug

comment:7 Changed 8 years ago by toruser32

This is definitely a bug, because this does not allow one to run multiple instances of tor any more.

comment:8 in reply to:  7 Changed 8 years ago by weasel

Replying to toruser32:

This is definitely a bug, because this does not allow one to run multiple instances of tor any more.

incorrect.

comment:9 Changed 8 years ago by toruser32

how can I run two instances then?

comment:10 Changed 8 years ago by Sebastian

The defaults are only applied when running as root or debian-tor, so you could run the second tor instance as another user

comment:11 in reply to:  10 Changed 8 years ago by weasel

Replying to Sebastian:

The defaults are only applied when running as root or debian-tor, so you could run the second tor instance as another user

And even if they both run as debian-tor, worst case they overwrite each other's controlsocket and cookie file. so what?

comment:12 Changed 8 years ago by toruser32

No, simultaniously starting two tor instances _at the same time_, for example via two /etc/init.d/-scripts that get executed _at the same time_, does not work.

comment:13 Changed 8 years ago by nickm

Milestone: Tor: unspecified

Solving #4552 might solve this as well, or make a solution easier.

comment:14 Changed 8 years ago by weasel

Resolution: not a bug
Status: newclosed

Looks the same as 3915, everything works as intended.

comment:15 Changed 7 years ago by nickm

Keywords: tor-client added

comment:16 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.