[tor-bugs] #19762 [Core Tor/Tor]: Tor systemd service should have ReadWriteDirectories=/var/run/tor

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jul 27 02:46:04 UTC 2016


#19762: Tor systemd service should have ReadWriteDirectories=/var/run/tor
------------------------------+---------------------
     Reporter:  candrews      |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  systemd
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+---------------------
 Tor writes it's pidfile to /var/run/tor/tor.pid by default.

 However,
 ​https://gitweb.torproject.org/tor.git/tree/contrib/dist/tor.service.in
 specifies that all but 2 directories are read only. Therefore, when one
 starts tor using:
 {{{
 systemctl start tor
 }}}
 using the default configuration, this error is logged in the journal:
 {{{
 Jul 26 22:42:32 irrational Tor[19048]: Unable to open
 "/var/run/tor/tor.pid" for writing: Read-only file system
 }}}
 and no pidfile is written.

 Adding:
 {{{
 ReadWriteDirectories=-/var/run/tor
 }}}
 to the [Service] section fixes the problem.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19762>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list