PDA

View Full Version : BUG with axfrdns-conf "axfrdns running like root"


nbari
December 5th, 2009, 03:53
I installed djbdns, configured tinydns and axfrdns but notice that axfrdsn was running like root instead of user axfrdns.

the problem was that the axfrdns-conf make a run file excluding the option -U

--
The -U option (uppercase "U") to tcpserver is designed to cooperate with envuidgid, to achieve the same effect:

#!/bin/sh
# mydaemon/run
#===
exec \
envuidgid safeuser \
tcpserver -U \
0 999 \
mydaemon

### that's all folks!
--

at the end the run script should look like this:

#!/bin/sh
exec 2>&1
exec envdir ./env sh -c '
exec envuidgid axfrdns softlimit -d300000 tcpserver -U -vDRHl0 -x tcp.cdb -- "$IP" 53 /usr/local/bin/axfrdns

the -U helps not running like root but now the problem is that axfrdns can not start properly:

axfrdns: fatal: unable to chroot to /var/tinydns/root: permission denied


any ideas ?

J65nko
December 6th, 2009, 13:23
How did you install axfrdns?

Through the FreeBSD ports or manually following http://cr.yp.to/djbdns/axfrdns.html and http://cr.yp.to/djbdns/axfrdns-conf.html ?

nbari
December 28th, 2009, 16:06
through the ports