0

I am using NetHunter Kali Linux. I am using the Tor service to start the Tor hidden services. When I enter sudo service tor start in the command line, the following error pops up:

/etc/init.d/tor: line 140: ulimit: open files: cannot modify limit: Operation not permitted

Checking if tor configuration is valid ... failed!
Oct 24 15:28:01.409 [notice] Tor 0.4.8.7 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.0.11, Zlib 1.2.13, Liblzma 5.4.4, Libzstd 1.5.5 and Glibc 2.37 as libc.
Oct 24 15:28:01.409 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Oct 24 15:28:01.410 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Oct 24 15:28:01.411 [notice] Read configuration file "/etc/tor/torrc".
Oct 24 15:28:01.418 [warn] /var/lib/tor/hidden_service/ is not owned by this user (debian-tor, 120) but by root (0). Perhaps you are running Tor as the wrong user?
Oct 24 15:28:01.419 [warn] Failed to parse/validate config: Failed to configure rendezvous options. See logs for details.
Oct 24 15:28:01.419 [err] Reading config failed--see warnings above.

1 Answer 1

0

Fix your permissions by using chown -R tor-user:tor-group /path/to/your/hs/folder - I do recommend to put in on the systemd service file as ExecStartPre line, just in case. The execution is started from the root user - and it's OK, because chown will be passing successfully and Tor itself will drop it's privileges to the user configured in your torrc ASAP

Update:

try chown -R debian-tor:debian-tor /var/lib/tor or chown -R tor:tor /var/lib/tor

1
  • tor-user and tor-group are placeholders for your real values from torrc. It's usually tor or debian-tor or tor-debian - user and group name
    – Alexey Vesnin
    Oct 26 at 11:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .