You are not logged in.
Pages: 1
As per https://wiki.archlinux.org/index.php/Tor#Configuration i created a script called tor-setup.sh and run it as a root, but when i am chrooting into
chroot /opt/torchroot /usr/bin/tori am getting this error:
chroot: cannot change root directory to /opt/torchroot: Operation not permittedand when i run it through sudo i got this:
[notice] Tor v0.2.3.25 running on Linux.
[notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
[notice] Read configuration file "/etc/tor/torrc".
[notice] Initialized libevent version 2.0.21-stable using method epoll (with changelist). Good.
[notice] Opening Socks listener on 127.0.0.1:9050
[warn] /var/lib/tor is not owned by this user (<unknown>, 0) but by tor (43). Perhaps you are running Tor as the wrong user?
[warn] Failed to parse/validate config: Couldn't access/create private data directory "/var/lib/tor"
[err] Reading config failed--see warnings above.]i think there is some permission issue, but not sure what it is??
please can anybody tell me about that...![]()
Last edited by arcon (2013-06-12 13:32:07)
The short cuts are only short because they don't actually go anywhere. -- Trilby
Nothing feels better than being understood -- awayand
A pathetic dreamer ![]()
Offline
Possibly you need to add tor to /etc/shells
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
No luck.. ![]()
The short cuts are only short because they don't actually go anywhere. -- Trilby
Nothing feels better than being understood -- awayand
A pathetic dreamer ![]()
Offline
It's been over a month; I hope necrobumping is appropriate in this case, since I experienced the same exact "problem" a couple of days ago and have the solution.
The solution is as follows:
# chroot --userspec=tor:tor /opt/torchroot /usr/bin/torOr to use systemd, put this into /etc/systemd/system/torchroot.service:
[Unit]
Description=torchroot
After=network.target
[Service]
User=root
Type=simple
ExecStart=/usr/bin/sh -c "chroot --userspec=tor:tor /opt/torchroot /usr/bin/tor -f /etc/tor/torrc"
KillSignal=SIGINT
LimitNOFILE=8192
[Install]
WantedBy=multi-user.targetAnd then do:
# systemctl enable torchroot.service
# systemctl start torchroot.serviceYou won't have any luck trying to run the command chroot as your normal user or the user tor. But /usr/bin/tor expects to be run by tor. So you run the chroot command as root, but use the option --userspec=tor:tor to have the specified command (that is, /usr/bin/tor) run as tor instead. Do a 'man chroot'. I hope my explanation didn't suck too much.
Last edited by vyu223 (2013-07-16 10:05:10)
Offline
Thanks for finding the solution and posting it here.
I hope my explanation didn't suck too much.
Hahaha no way actually it's pretty good i'm able to understand every thing, thanks aagain.
Last edited by arcon (2013-07-16 11:18:28)
The short cuts are only short because they don't actually go anywhere. -- Trilby
Nothing feels better than being understood -- awayand
A pathetic dreamer ![]()
Offline
Pages: 1