#2296 closed defect (fixed)

tahoe with torsocks 2.0 leads to "[Errno 1] Operation not permitted"

Reported by: irregulator Owned by: daira
Priority: normal Milestone: 1.10.1
Component: code-network Version: 1.10.0
Keywords: anonymity iputil Cc: matt@…
Launchpad Bug:

Description

I'm trying to use tahoe with torsocks.

It's tahoe 1.10.0-2 and Torsocks 2.0.0-1 from debian testing.

torsocks tahoe start       
STARTING '/home/user/.tahoe'
An error has occurred: '[Errno 1] Operation not permitted'
Please look at log file for more information.

2014-09-09 19:29:41+0300 [-] Log opened.
2014-09-09 19:29:41+0300 [-] twistd 14.0.0 (/usr/bin/python 2.7.8) starting up.
2014-09-09 19:29:41+0300 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2014-09-09 19:29:41+0300 [-] Traceback (most recent call last):
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/allmydata/scripts/runner.py", line 156, in run
2014-09-09 19:29:41+0300 [-]     rc = runner(sys.argv[1:], install_node_control=install_node_control)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/allmydata/scripts/runner.py", line 135, in runner
2014-09-09 19:29:41+0300 [-]     rc = startstop_node.dispatch[command](so, stdout, stderr)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/allmydata/scripts/startstop_node.py", line 73, in start
2014-09-09 19:29:41+0300 [-]     twistd.run()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 27, in run
2014-09-09 19:29:41+0300 [-]     app.run(runApp, ServerOptions)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 642, in run
2014-09-09 19:29:41+0300 [-]     runApp(config)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
2014-09-09 19:29:41+0300 [-]     _SomeApplicationRunner(config).run()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 380, in run
2014-09-09 19:29:41+0300 [-]     self.postApplication()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 193, in postApplication
2014-09-09 19:29:41+0300 [-]     self.startApplication(self.application)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 381, in startApplication
2014-09-09 19:29:41+0300 [-]     service.IService(application).privilegedStartService()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 277, in privilegedStartService
2014-09-09 19:29:41+0300 [-]     service.privilegedStartService()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 277, in privilegedStartService
2014-09-09 19:29:41+0300 [-]     service.privilegedStartService()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 277, in privilegedStartService
2014-09-09 19:29:41+0300 [-]     service.privilegedStartService()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/internet.py", line 105, in privilegedStartService
2014-09-09 19:29:41+0300 [-]     self._port = self._getPort()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/application/internet.py", line 133, in _getPort
2014-09-09 19:29:41+0300 [-]     'listen%s' % (self.method,))(*self.args, **self.kwargs)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP
2014-09-09 19:29:41+0300 [-]     p.startListening()
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 980, in startListening
2014-09-09 19:29:41+0300 [-]     skt.listen(self.backlog)
2014-09-09 19:29:41+0300 [-]   File "/usr/lib/python2.7/socket.py", line 224, in meth
2014-09-09 19:29:41+0300 [-]     return getattr(self._sock,name)(*args)
2014-09-09 19:29:41+0300 [-] error: [Errno 1] Operation not permitted

tahoe client works fine without torsocks

Change History (5)

comment:1 Changed at 2014-12-30T01:37:45Z by mhazinsk

I'm getting the same issue on both Arch Linux and CentOS 6 with the latest torsocks. It appears to come from torsocks 2.x explicitly blocking listenUDP() in src/allmydata/util/get_local_ip_for(). This should fix the issue: https://github.com/tahoe-lafs/tahoe-lafs/pull/133

comment:2 Changed at 2014-12-30T01:39:58Z by mhazinsk

  • Cc matt@… added
  • Summary changed from tahoe with torsocks leads to "[Errno 1] Operation not permitted" to tahoe with torsocks 2.0 leads to "[Errno 1] Operation not permitted"

comment:3 Changed at 2014-12-30T02:02:09Z by mhazinsk

  • Component changed from unknown to code-network
  • Keywords anonymity iputil review-needed added

comment:4 Changed at 2014-12-30T19:57:36Z by daira

  • Milestone changed from undecided to 1.11.0
  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed at 2014-12-30T19:58:59Z by daira

  • Keywords review-needed removed
Note: See TracTickets for help on using tickets.