1

I compiled and installed tor on minibian. All I must do now is to start tor with tor.

But all I get is

Mar 15 16:51:36.713 [notice] Tor v0.2.7.6 running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Mar 15 16:51:36.716 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Mar 15 16:51:36.718 [notice] Read configuration file "/usr/local/etc/tor/torrc".
Mar 15 16:51:36.757 [notice] Based on detected system memory, MaxMemInQueues is set to 278 MB. You can override this by setting MaxMemInQueues by hand.
Mar 15 16:51:36.774 [notice] Opening OR listener on 0.0.0.0:443
Mar 15 16:51:36.778 [notice] Opening Directory listener on 0.0.0.0:80
Mar 15 16:51:36.000 [warn] Couldn't open file for 'Log notice file /var/log/tor/notices.log': Permission denied
Mar 15 16:51:36.000 [notice] Closing partially-constructed OR listener on 0.0.0.0:443
Mar 15 16:51:36.000 [notice] Closing partially-constructed Directory listener on 0.0.0.0:80
Mar 15 16:51:36.000 [warn] Failed to parse/validate config: Failed to init Log options. See logs for details.
Mar 15 16:51:36.000 [err] Reading config failed--see warnings above.

With sudo tor there's no problem and it runs smoothly but normally I don't have run tor as root. Now I don´t know how to deal with the ownership of the logs. When I do sudo chmod 777 -R /var/log/tor tor runs but then there's less security.

root@Debian:/var/log# ls -al /usr/local/bin/tor
-rwxr-xr-x 1 debian-tor adm 2091616 Mär 15 14:58 /usr/local/bin/tor

Thanx!

7
  • 1
    That shows the owner as debian-tor. So you'll need to ensure that any files written by tor are owned by debian-tor or have debiab-tor as a group member with write permission.
    – joan
    Commented Mar 15, 2016 at 16:44
  • ls -al /var/log/tor drwxrws--- 2 debian-tor debian-tor 4096 Mär 15 06:25 tor
    – Hirsch
    Commented Mar 15, 2016 at 16:47
  • The d indicates a directory. Are all the files in that directory owned by debian-tor?
    – joan
    Commented Mar 15, 2016 at 16:49
  • Yes! ls -al /var/log/tor/ -> -rw-r----- 1 debian-tor debian-tor 20742 Mär 15 16:46 notices.log
    – Hirsch
    Commented Mar 15, 2016 at 16:50
  • Then perhaps tor isn't being run as debian-tor? Try a ps aux | grep tor while it is running and see who owns the process.
    – joan
    Commented Mar 15, 2016 at 16:53

1 Answer 1

1

Success! :-D I changed the rights of the logs with chmod 660 *. This is the result:

-rw-rw---- 1 debian-tor debian-tor 25124 Mär 15 20:49 notices.log.

And the log folder /var/log/tor

drwxr-s--- 2 debian-tor debian-tor 4096 Mär 15 06:25 tor

goes like this.

Thanx!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.