Solved Named Won't start

captcurrent

Member


Messages: 39

I am running FreeBSD 11.2 and using bind912-9.12.3P1_3 .

I am unaware of changes I have made to the server except updating PHP

I am getting the following error

Feb 19 09:47:50 triggerfish named[10649]: the working directory is not writable
Feb 19 09:47:50 triggerfish named[10649]: loading configuration: permission denied
Feb 19 09:47:50 triggerfish named[10649]: exiting (due to fatal error)
Feb 19 09:47:50 triggerfish root: /usr/local/etc/rc.d/named: WARNING: failed to start named

From what I have read or remember
Feb 19 09:47:50 triggerfish named[10649]: the working directory is not writable
is expected

Feb 19 09:47:50 triggerfish named[10649]: loading configuration: permission denied
is however not expected

named.conf has
lrwxr-xr-x 1 root wheel
permissions, which I have not changed (well in the last year). I am assuming these permissons are wrong??
 

tommiie

Active Member

Reaction score: 44
Messages: 174

Can you share your configuration file? How do you start named?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,370
Messages: 29,907

Why is a configuration file marked as executable? And why is it a link?

Code:
root@maelcum:~ # ll /usr/local/etc/namedb/
total 49
-rw-r--r--  1 root  wheel   2761 Feb 11 06:23 bind.keys
drwxr-xr-x  2 bind  wheel      7 Feb 19 12:49 dynamic/
drwxr-xr-x  2 root  wheel      7 Feb 16 17:14 master/
-rw-r--r--  1 root  wheel  33993 Jan 10 22:42 named.conf
-rw-r--r--  1 root  wheel  21682 Feb 11 06:23 named.conf.sample
-rw-r--r--  1 root  wheel   3402 Feb 11 06:23 named.root
-rw-r--r--  1 root  wheel    868 Feb 11 06:23 rndc.conf.sample
-rw-------  1 root  wheel     97 Nov 24 20:13 rndc.key
drwxr-xr-x  2 bind  wheel      2 Feb 11 06:23 slave/
drwxr-xr-x  2 bind  wheel      2 Feb 16 17:14 working/
The only directories you need to watch for are dynamic, slave and working. Those need to be owned by bind and have write permissions.
 
OP
OP
C

captcurrent

Member


Messages: 39

As I "peeled the onion back" and i looked at SirDice's condgiration file i suddenly realized I was working with the wrong files/directory Honest truth I have no idea bind ever worked.That is story for another day and a lot more research.


Ok a combination of answers to SirDice and tommiee

I start named at boot from /usr/local/etc/rc.d

checking permissions my /usr/local/etc/namedb/ is as follows:

Code:
drwxr-xr-x   7 bind  wheel    512 Feb 14 12:27 .
drwxr-xr-x  28 root  wheel   2048 Feb 18 12:48 ..
-rw-r--r--   1 bind  wheel   2761 Feb 14 12:26 bind.keys
drwxr-xr-x   2 bind  wheel    512 Feb 14 12:26 dynamic
drwxr-xr-x   2 root  wheel    512 Feb 14 12:27 master
-rw-r--r--   1 bind  wheel    586 Nov  4  2015 named.bad
-rw-r--r--   1 root  wheel   1597 Mar  7  2018 named.conf
-rw-r--r--   1 bind  wheel  21682 Feb 14 12:26 named.conf.sample
-rw-r--r--   1 bind  wheel  17591 Nov  4  2015 named.confx
-rw-r--r--   1 bind  wheel    840 Nov  4  2015 named.nov
-rw-r--r--   1 root  wheel   3402 Feb 14 12:26 named.root
-rw-r--r--   1 bind  wheel    630 Nov  4  2015 named.test
drwxr-xr-x   2 bind  wheel    512 Nov  4  2015 reverse
-rw-r--r--   1 bind  wheel    868 Feb 14 12:26 rndc.conf.sample
-rw-------   1 root  wheel     97 Nov  4  2015 rndc.key
drwxr-xr-x   2 bind  wheel    512 Feb 14 12:26 slave
drwxr-xr-x   2 bind  wheel    512 Feb 14 12:26 working

I have cleaned up locations and permissions but still getting the the following error


Code:
Feb 19 13:12:17 triggerfish named[15533]: BIND 9 is maintained by Internet Systems Consortium,
Feb 19 13:12:17 triggerfish named[15533]: Inc. (ISC), a non-profit 501(c)(3) public-benefit 
Feb 19 13:12:17 triggerfish named[15533]: corporation.  Support and training for BIND 9 are 
Feb 19 13:12:17 triggerfish named[15533]: available at https://www.isc.org/support
Feb 19 13:12:17 triggerfish named[15533]: ----------------------------------------------------
Feb 19 13:12:17 triggerfish named[15533]: could not configure root hints from '/etc/namedb/named.root': file not found
Feb 19 13:12:17 triggerfish named[15533]: loading configuration: file not found
Feb 19 13:12:17 triggerfish named[15533]: exiting (due to fatal error)
Feb 19 13:12:17 triggerfish root: /usr/local/etc/rc.d/named: WARNING: failed to start named
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,370
Messages: 29,907

Code:
could not configure root hints from '/etc/namedb/named.root': file not found
Check your named.conf, you still have some references to /etc/namedb instead of /usr/local/etc/namedb (I suspect this was a configuration from an older FreeBSD version that still had named in the base).
 
OP
OP
C

captcurrent

Member


Messages: 39

That was right on... I managed to kill the whole thing and and rebuilidng from scratch... I also managed to kill my archives I cant figure how to make this string SOLVED (or at least KILLED)
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,370
Messages: 29,907

I also managed to kill my archives I cant figure how to make this string SOLVED (or at least KILLED)
You mean this setting this thread to "SOLVED"? Just edit the first post of the thread. You'll find the label next to the subject.
 
Top