Doing ls -l /var/lib/tor I get the following:

Permissions user user

There are 14 more just like it. Is this normal? And if not, How do I remove them? Thanks for any help!

  • How did you install tor, and what operating system are you using?
    – Steve
    Aug 14 '20 at 23:58
  • Hi Steve, thank you! I'm trying to run a relay on a droplett using Ubuntu 18.4. If I understand correctly, shouldn't /var/lib/tor be owned by debian-tor?
    – adriann
    Aug 16 '20 at 2:39

Yes that directory (and all files in it) should be owned by debian-tor if you installed tor using apt.

You should be able to fix that with sudo chown -R debian-tor:debian-tor /var/lib/tor. But first make sure that tor is running under the same user by checking that ps -o user= -p $(pgrep -x tor) returns debian-tor.

  • Holy Socks! that answers a few questions. How do I remove owner 'user' and replace with debian-tor? >Adri
    – adriann
    Aug 16 '20 at 3:01
  • @adriann (I made an edit to the command above.) Files and directories in Linux can generally have only a single owner, so the command in the post above (sudo chown ...) replaces the owner user with the owner debian-tor. The -R option says to change the owner for all files in the directory as well. The debian-tor:debian-tor repeats twice since you want to change not just the owner, but also the group.
    – Steve
    Aug 16 '20 at 3:30
  • When I use the ps -o etc. the return I get is root, not debian-tor. FWIW - ls -l /var/lib/tor produces debian-tor:debian-tor. sudo debian-tor tor produces nothing (understandable I think) > Adri
    – adriann
    Aug 18 '20 at 9:52
  • @adriann Okay, the permissions on /var/lib/tor look okay now, and are still accessible by the user running tor (root in this case). Tor should probably not be running as root though, especially if you installed it using apt. Without knowing more about your setup, I'm not sure how to fix it.
    – Steve
    Aug 18 '20 at 14:37

Your Answer

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

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