Tor service doesn't use /etc/tor/torrc

When Ubuntu started, tor service doesn’t use /etc/tor/torrc, until I stop the service and then start tor not as service, it will read /etc/tor/torrc as default. I want to know why, and how to set the tor service read /etc/tor/torrc.

Can you please share what version of Ubuntu and tor you are using?

Did you enable the daemon?

In this case, it will be very helpful if you tell us what steps you took to set tor up.

Trisquel 11 mini

Tor 0.4.8.12

The installation enabled the tor.service by default.

systemctl status tor

Loaded: loaded (/usr/lib/systemd/system/tor.service; disabled; preset: disabled)

cat /usr/lib/systemd/system/tor.service

[Service]

ExecStartPre=/usr/bin/tor --runasdaemon 0 –defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config
ExecStart=/usr/bin/tor --runasdaemon 0 –defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc

Also check which default rc is loading, by starting and seek the process,

ps -ef|grep [t]or

… and read the defaults parameters…

/usr/bin/tor –defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0

In that case above, torrc is not present in “/etc/tor/torrc” so it’s working only with the default “/usr/share/tor/tor-service-defaults-torrc”.