I've installed the tor package via homebrew, and cofigured
/usr/local/etc/tor/torrc according to the documentation.
My problem is that every time I try to use launchctl I get an error,
both as an admin user and via sudo.
As an admin user:
Could not open job overrides database at:
/private/var/db/launchd.db/com.apple.launchd.peruser.502/overrides.plist:
13: Permission denied
launch_msg(): Socket is not connected
When run via sudo it complains about "dubious owbership on file" and
says "nothing found to load".
I followed whatever documentation I could find. The torrc config is on
torproject.org under "configuring a relay graphically" (I know this
isn't graphically), the homebrew info is linked to in the same article
and looks to be from a mailing list discussion.
I wanted to set up a simple relay to run automatically when the (OS X)
machine boots. It's a home server on a 30MB/sec symmetrical fiber
line. Since I run the machine as a file server anyway, I figured I
could allocate some bandwidth and help support the community.
Thanks,
Surf Norway
Hi Surf,
A few pointers:
1. On OS X, launchctl has to be run as root/superuser in order to start system-wide services. You can do this using sudo.
2. launchd plist files can't be writable by anyone other than the superuser. If you've installed the tor launchd plist file as your admin user, it will have permissions based on your user, not root.
You have a few options here:
A. Disk Utility's "Fix Permissions" might automatically fix ownership for you, but it might also leave the file alone because it wasn't installed by the OS X Installer.
B. You could try (re-)installing the launchd plist file as root using "sudo". This will make sure the owner is "root".
C. Or you could use the "ls -l", "chown" and/or "chmod" commands in the Terminal to investigate and fix the ownership and permissions yourself.
3. It's hard to tell what torrc instructions you're following, but instructions for other platforms will require modifications. OS X launchd works differently to both Linux/BSD and Windows services. For example, you can't use "RunAsDaemon 1" on OS X, or launchd will think tor has crashed.
A. You might want to try the OS X-specific instructions at:
By the way, if this is your first tor relay, and since it's at home, you probably want to run a relay with no exit ports open. And if you have multiple IPs, on its own IP. This is a much safer option than running an exit on a shared IP.
If you're still having problems, can you please include URL(s) of the instructions you're following, copies of your torrc and launchd plist files, and the exact output from the launchctl and tor programs?
This really helps us help you, because then we can see exactly what you're seeing.
A final question: can you manually launch tor without using launchd?
It sounds like you're not even getting to the point where launchd tries to run tor. But it can be helpful to make sure that tor will run without the added intermediary of launchd.
T