Ask Your Question
1

Issues with tor.service

asked 2018-05-14 17:44:52 -0500

Rspigler gravatar image

I am setting up a bitcoin full node on my fedora 28 machine. I am setting it up to accept connections via my onion address and my ip address.

After installing tor (dnf install tor), I enter into my torrc file (vim /etc/tor/torrc) and enter:

HiddenServiceDir /var/lib/tor/bitcoin-service/
HiddenServicePort 8333 127.0.0.1:8333

Exit torrc file and then restart tor by (systemctl restart tor.service)

Everything good until up to here. I get the error:

Job for tor.service failed because the control process exited with error code. See "systemctl status tor.service" and "cournalctl -xe" for details.

systemctl status tor.service

tor.service - Anonymizing overlay network for TCP

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

Active: failed (Result: exit-code) . since Mon 2018-05-14 17:56:34 EDT; 1s ago

Process: 19861 ExecStartPre=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config (code=exited, status =1/FAILURE)

localhost.localdomain systemd[1]: tor.service: Service hold-off time over, scheduling restart.

localhost.localdomain systemd[1]: tor.service: Scheduled restart job, restart counter is at 5

localhost.localdomain systemd[1]: Stopped Anonymizing overlay network for TCP.

localhost.localdomain systemd[1]: tor.service: Start request repeated too quickly.

localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.

localhost.localdomain systemd[1]: Failed to start Anonymizing overlay network for TCP.

line 1-11/11 (END)

journalctl -xe

Unit tor.service has begun starting up.

localhost.localdomain tor [20336]: [notice] Tor 0.3.2.10 (git -31cc63deb69db819) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.0h-fips, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.

localhost.localdomain tor [20336]: [notice] Read configuration file "/usr/share/tor/defaults-torrc".

localhost.localdomain tor [20336]: [notice] Read configuration file "/etc/tor/torrc".

localhost.localdomain audit [20336]: AVC avc: denied { dacreadsearch } for pid=20336 comm="tor" capability=2 scontext=systemu:systemr:tort:s0 tcontext=systemu:systemrtort:s0 tclass=capability permissive=0

localhost.localdomain audit [20336]: AVC avc: denied {dacoverride } for pid=20336 comm="tor" capability=1 scontext=systemu:systemr:tort:s0 tcontext=systemu:systemr:tort:s0 tcpmtext=systemu:systemr:tort:s0 tclass=capability permissive=0

localhost.localdomain tor[20336] [warn] Directory /var/lib/tor/bitcoin-service/ cannot be read: Permission denied

localhost.localdomain tor[20336] [warn] Failed to parse/validate config: Failed to configure rendezvous options. See logs for details.

localhost.localdomain tor[20336] [err] Reading config failed --see warnings above.

localhost.localdomain systemd[1]: tor.service: Control process exited, code=exited status=1

localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.

localhost.localdomain systemd[1]: Failed to start Anonymizing overlay network for TCP.

--Subject: unit tor.service has failed

--Defined-By: systemd

--Unit tor.service has failed

line 1818-1840/1840 (END)

I don't understand why I'm getting the permission denied error for /var/lib/tor/bitcoin-service/ but I assume ... (more)

edit retag flag offensive close merge delete

Comments

Found an ugly hack around this -

vim /etc/selinux/config

and setting

SELINUX=disabled

and

SELINUXTYPE=minimum

But there's got to be a MUCH better/safer way to do this.

Rspigler gravatar imageRspigler ( 2018-05-14 22:20:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-14 22:33:29 -0500

Rspigler gravatar image

Should note that conversation is also ongoing here: (https://bitcointalk.org/index.php?top...)

Been confirmed by another user (Foxpup) that it is indeed an SELinux problem. I am closing this to open a more specific question now that I have a better understanding of the issue

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-05-14 17:44:52 -0500

Seen: 131 times

Last updated: May 14