0

my config /etc/systemd/system/multi-user.target.wants/tor.service

[Unit]
Description=Anonymizing overlay network for TCP
After=syslog.target network.target nss-lookup.target

[Service]
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/tor -f /etc/tor/torrc --verify-config
ExecStart=/usr/bin/tor -f /etc/tor/torrc
ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutSec=60
Restart=on-failure
WatchdogSec=1m
LimitNOFILE=32768

#Hardening

PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/tor
ReadWriteDirectories=-/var/log/tor
NoNewPrivileges=yes
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH


[Install]
WantedBy=multi-user.target

when stop or restart tor frozen screen

for me working tor without problem I just can't stop or restart tor.service, when stop or restart tor frozen screen

And task I can't kill show error

"An error was encouraged by sending signal to the PID961. It is likely you don't have the required privileges"

4
  • Do you have selinux enabled? cat /etc/selinux/config
    – Kahn
    Feb 26 at 14:32
  • No,not enable For me، not folder path /etc/selinux/ #edited ask and add more details
    – User677
    Feb 26 at 18:31
  • 1. When you specify Type=notify, you tell systemd that the service knows how to talk to systemd via dbus. Are you certain that this service does that? 2. KillSignal=INT is an unusual choice for a signal. Traditionally, SIGTERM is used for services (SIGINT is the signal sent from the tty by Ctrl+C). Are you sure the service expect SIGINT as a signal to stop? It may well ignore it.
    – kkm
    Feb 28 at 13:06
  • type=simple KillSignal=SIGTERM My config tor.service generated with script(tor auto install), I made the changes you said, but still the problem is not solved. The problem with the service tor is when it restart or stop happen break the sessions. I trying stop tor process with task manager show info " stopping process may destroy data, break the sessions or introduce a security risk,..." . Does anyone know where the problem comes from?
    – User677
    Mar 1 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.