Opened 3 years ago

Last modified 3 months ago

#19762 new defect

Tor systemd service should have ReadWriteDirectories=/var/run/tor

Reported by: candrews Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: systemd tor-relay hardening packaging
Cc: candrews Actual Points:
Parent ID: #30797 Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (8)

comment:1 Changed 3 years ago by nickm

Milestone: Tor: 0.2.9.x-final

comment:2 Changed 3 years ago by isabela

Keywords: isaremoved added
Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

comment:3 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:4 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:5 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:6 Changed 2 years ago by nickm

Keywords: isaremoved removed

comment:7 Changed 2 years ago by nickm

Keywords: tor-relay hardening packaging added

comment:8 Changed 3 months ago by arma

Parent ID: #30797
Note: See TracTickets for help on using tickets.