# BUG with axfrdns-conf "axfrdns running like root"



## nbari (Dec 5, 2009)

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 [color="Red"]-U [/color]-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 (Dec 6, 2009)

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 (Dec 28, 2009)

through the ports


----------

