0

I just installed Tor on my server and am still using default torrc. It's Ubuntu 20.04.

systemctl reports it's active, but ps doesn't list it. /var/log/tor is empty, its permissions is

drwxr-s--- 2 debian-tor adm 4096 dez 31 16:18 ./

/etc/tor is

ll /etc/tor
total 32
drwxr-xr-x   2 root root  4096 dez 31 16:34 ./
drwxr-xr-x 147 root root 12288 dez 31 16:34 ../
-rw-r--r--   1 root root  8888 dez 31 16:34 torrc
-rw-r--r--   1 root root  2087 dez 31 16:34 torsocks.conf

Verifying /var/log/syslog it seems it's unable to read /etc/tor/torrc:

Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.533 [notice] Tor 0.4.4.6 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.4.
Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.533 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.533 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.533 [notice] Read configuration file "/etc/tor/torrc".
Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.534 [notice] Based on detected system memory, MaxMemInQueues is set to 8192 MB. You can override this by setting MaxMemInQueues by hand.
Dec 31 16:21:32 Urubu4 tor[27542]: Dec 31 16:21:32.534 [warn] Can't set a DirPort on a bridge relay; disabling DirPort
Dec 31 16:21:32 Urubu4 tor[27542]: Configuration was valid
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [notice] Tor 0.4.4.6 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.4.
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [warn] Could not open "/etc/tor/torrc": Permission denied
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [warn] Unable to open configuration file "/etc/tor/torrc".
Dec 31 16:21:32 Urubu4 tor[27546]: Dec 31 16:21:32.548 [err] Reading config failed--see warnings above.
Dec 31 16:21:32 Urubu4 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Dec 31 16:21:32 Urubu4 systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 31 16:21:32 Urubu4 systemd[1]: Failed to start Anonymizing overlay network for TCP.

What might be wrong?

8
  • You can check the status with systemctl status tor@default and the log with journalctl -u tor@default. Are you sure the torrc has the default settings? The line Can't set a DirPort on a bridge relay; disabling DirPort suggests that something has been changed.
    – Steve
    Dec 31, 2020 at 20:35
  • tnx! I'm setting up a new Ubuntu server and using Macrium to make backups of its partition. I had installed Tor before and had issues, so I restored the backup from before I had installed it and did it again with default settings. I can assure I had just installed it following support.torproject.org/apt/tor-deb-repo and community.torproject.org/relay/setup/bridge/debian-ubuntu and had made no changes on /etc/tor, specially on its permissions (because of this odd permissions denied error). I verified once more and whole torrc is fully commented.
    – Hikari
    Dec 31, 2020 at 21:29
  • What's the difference of service [email protected] and tor.service?
    – Hikari
    Dec 31, 2020 at 21:32
  • This is odd... [email protected] was running, IDK if that's why tor.service was failing. I tried stopping and starting both and they generate different logs on journalctl, none of them on /var/log/tor. tor@default is more detailed.
    – Hikari
    Dec 31, 2020 at 21:39
  • Somehow I got confused on tor.service and [email protected]. /var/log/tor is empty but journalctl -u tor@default shows the proper log, I applied my custom torrc and it's working.
    – Hikari
    Dec 31, 2020 at 22:24

0

You must log in to answer this question.

Browse other questions tagged .