# FreeBSD 11.1 + Bind99



## pavlar (Sep 7, 2017)

named run with :

```
boss root: /etc/rc: WARNING: named_pidfile: now determined from the conf file
```


```
Sep  7 08:05:46 boss named[534]: Required root permissions to open '/var/run/named/pid'.
Sep  7 08:05:46 boss named[534]: Please check file and directory permissions or reconfigure the filename.
Sep  7 08:05:46 boss named[534]: Required root permissions to open '/var/run/named/session.key'.
Sep  7 08:05:46 boss named[534]: Please check file and directory permissions or reconfigure the filename
```
What can I do?


----------



## SirDice (Sep 7, 2017)

What are the permissions on /var/run/named?


```
% ls -ld /var/run/named
drwxr-xr-x  2 bind  bind  3 Sep  6 08:36 /var/run/named
```

Did you set named_uid in /etc/rc.conf?


----------



## pavlar (Sep 7, 2017)

```
ls -ld /var/run/named
drwxrwxr--  2 root  wheel  512 Sep  7 08:05 /var/run/named
```


```
named_enable="YES"
named_program="/usr/local/sbin/named"
named_conf="/usr/local/etc/namedb/named.conf"
named_pidfile="/var/run/named/pid"
named_uid="bind"
named_flags="-4"
```


----------



## pavlar (Sep 7, 2017)

I do

```
chown bind:bind /var/run/named/
```
Thanks. now it work


```
Sep  7 19:13:09 boss root: /etc/rc: WARNING: named_pidfile: now determined from the conf file
Sep  7 19:13:09 boss named[547]: starting BIND 9.9.11 (Extended Support Version) <id:efa5130> -4 -u bind -c /usr/local/etc/namedb/named.conf
Sep  7 19:13:09 boss named[547]: running on FreeBSD amd64 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.$
Sep  7 19:13:09 boss named[547]: built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--with-libxml2=/usr/loc$
Sep  7 19:13:09 boss named[547]: ----------------------------------------------------
Sep  7 19:13:09 boss named[547]: BIND 9 is maintained by Internet Systems Consortium,
Sep  7 19:13:09 boss named[547]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Sep  7 19:13:09 boss named[547]: corporation.  Support and training for BIND 9 are
Sep  7 19:13:09 boss named[547]: available at https://www.isc.org/support
Sep  7 19:13:09 boss named[547]: ----------------------------------------------------
Sep  7 19:13:09 boss named[547]: command channel listening on 127.0.0.1#953
Sep  7 19:13:09 boss named[547]: all zones loaded
Sep  7 19:13:09 boss named[547]: running
```
These messages appeared after  updating  FreeBSD from  11.0 to 11.1


----------



## SirDice (Sep 7, 2017)

You can remove all of these:

```
named_program="/usr/local/sbin/named"
named_conf="/usr/local/etc/namedb/named.conf"
named_pidfile="/var/run/named/pid"
named_uid="bind"
```
Those are the default settings, you don't have to be specify them.


----------



## pavlar (Sep 8, 2017)

Thank you. Now MTA is loaded without superfluous messages


```
Sep  8 08:08:39 boss named[546]: starting BIND 9.9.11 (Extended Support Version) <id:efa5130> -4 -u bind -c /usr/local/etc/namedb/named.conf
Sep  8 08:08:39 boss named[546]: running on FreeBSD amd64 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.$
Sep  8 08:08:39 boss named[546]: built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--with-libxml2=/usr/loc$
Sep  8 08:08:39 boss named[546]: ----------------------------------------------------
Sep  8 08:08:39 boss named[546]: BIND 9 is maintained by Internet Systems Consortium,
Sep  8 08:08:39 boss named[546]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Sep  8 08:08:39 boss named[546]: corporation.  Support and training for BIND 9 are
Sep  8 08:08:39 boss named[546]: available at https://www.isc.org/support
Sep  8 08:08:39 boss named[546]: ----------------------------------------------------
Sep  8 08:08:39 boss named[546]: command channel listening on 127.0.0.1#953
Sep  8 08:08:39 boss named[546]: /usr/local/etc/namedb/master/mts.zone:65: using RFC1035 TTL semantics
Sep  8 08:08:39 boss named[546]: /usr/local/etc/namedb/master/rials.zone:63: using RFC1035 TTL semantics
Sep  8 08:08:39 boss named[546]: all zones loaded
Sep  8 08:08:39 boss named[546]: running
```


----------

