Hi all, I'm having this issue with the recently upgraded security/tor-devel (upgraded to tor-devel-0.2.1.7.a) port. I'm unable to start the tor service using its rc.d script.
,---- | % sudo /usr/local/etc/rc.d/tor start | Password: | Starting tor. | Dec 23 01:18:42.779 [notice] Tor v0.2.1.7-alpha (r17216). This is experimental software. Do not rely on it for strong anonymity. (Running on FreeBSD amd64) | Dec 23 01:18:42.784 [notice] Initialized libevent version 1.4.8-stable using method kqueue. Good. | Dec 23 01:18:42.784 [notice] Opening OR listener on 0.0.0.0:9001 | Dec 23 01:18:42.784 [notice] Opening Directory listener on 0.0.0.0:9030 | Dec 23 01:18:42.785 [notice] Opening Socks listener on 127.0.0.1:9050 | Dec 23 01:18:42.785 [notice] Opening Socks listener on 172.16.0.2:9050 | Dec 23 01:18:42.787 [warn] Error setting configured groups: Operation not permitted | Dec 23 01:18:42.788 [warn] Failed to parse/validate config: Problem with User value. See logs for details. | Dec 23 01:18:42.788 [err] Reading config failed--see warnings above. | % uname -a | FreeBSD chateau.d.lf 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #7: Sat Nov 1 06:58:27 IST 2008 [email protected]:/usr/obj/usr/src/sys/ULE amd64 `---- It seems in above rc script, there is a transition to "_tor" uid happens before the execution and hence this error. Following is the fix to this issue: ,---- | abbe [~] chateau% diff -u /usr/local/etc/rc.d/tor{,2} | --- /usr/local/etc/rc.d/tor 2008-12-23 00:27:35.000000000 +0530 | +++ /usr/local/etc/rc.d/tor2 2008-12-23 01:27:48.000000000 +0530 | @@ -40,10 +40,15 @@ | command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --User ${tor_user} --Log notice\ file\ ${tor_logfile}" | extra_commands="log" | log_cmd="${name}_log" | +start_cmd="${name}_start" | | tor_log() { | cat ${tor_logfile} | } | | +tor_start() { | + _run_rc_doit $command $command_args | +} | + | run_rc_command "$1" `---- So, can some tell me if this is the good fix. I will submit a PR. Thanks -- Ashish Shukla
pgpIPJFhMd72y.pgp
Description: PGP signature
