Ubuntu 12.04: bind9 não deseja iniciar (Permissão negada)

1

Estou tentando iniciar o bind9 sem sucesso. O erro parece estar relacionado à permissão, mas não consigo encontrar a causa.

root@server:~# /etc/init.d/bind9 start

Feb 18 20:42:24 server named[2974]: zone 0.in-addr.arpa/IN: loaded serial 1

Feb 18 20:42:24 server named[2974]: zone 127.in-addr.arpa/IN: loaded serial 1

Feb 18 20:42:24 server named[2974]: zone 57.168.192.in-addr.arpa/IN: loading from master

file /etc/bind/zones/rev.57.168.192.in-addr.arpa failed: permission denied

Feb 18 20:42:24 server named[2974]: zone 57.168.192.in-addr.arpa/IN: not loaded due to errors.

Aqui está o arquivo de configuração:

root@server:/etc/bind# cat named.conf

include "/etc/bind/named.conf.options";

include "/etc/bind/named.conf.local";

include "/etc/bind/named.conf.default-zones"

root@server:/etc/bind# cat named.conf.options

options {

    directory "/var/cache/bind";


    forwarders {

        8.8.8.8;

                4.4.4.4;

     };

    auth-nxdomain no;    # conform to RFC1035

    listen-on-v6 { any; };

};

root@server:/etc/bind# cat named.conf.local

zone "example.com" {

type master;

file "/etc/bind/zones/example.com.db";

};

zone "57.168.192.in-addr.arpa" {

type master;

file "/etc/bind/zones/rev.57.168.192.in-addr.arpa";

};

root@server:/etc/bind# cat named.conf.default-zones

// prime the server with knowledge of the root servers
zone "." {

    type hint;

    file "/etc/bind/db.root";

};

// be authoritative for the localhost forward and reverse zones, and for

// broadcast zones as per RFC 1912

zone "localhost" {

    type master;

    file "/etc/bind/db.local";

};

zone "127.in-addr.arpa" {

    type master;

    file "/etc/bind/db.127";

};

zone "0.in-addr.arpa" {

    type master;

    file "/etc/bind/db.0";

};

zone "255.in-addr.arpa" {

    type master;

    file "/etc/bind/db.255";

};


File Permissions seems to be fine

root@server:/etc/bind/zones# ls -all

-rw-r--r-- 1 root bind  675 Feb 16 22:28 example.com.db

-rw-r--r-- 1 root bind  599 Feb 16 22:15 rev.57.168.192.in-addr.arpa

Everything seems to be O.K. when I start it manually

root@server:~# named -g

18-Feb-2014 21:21:20.913 starting BIND 9.8.1-P1 -g

18-Feb-2014 21:21:21.035 zone 0.in-addr.arpa/IN: loaded serial 1

18-Feb-2014 21:21:21.035 zone 127.in-addr.arpa/IN: loaded serial 1

18-Feb-2014 21:21:21.053 zone 57.168.192.in-addr.arpa/IN: loaded serial 2

18-Feb-2014 21:21:21.054 zone 255.in-addr.arpa/IN: loaded serial 1

18-Feb-2014 21:21:21.071 zone example.com/IN: loaded serial 1

18-Feb-2014 21:21:21.072 zone localhost/IN: loaded serial 2

18-Feb-2014 21:21:21.072 managed-keys-zone ./IN: loaded serial 0

18-Feb-2014 21:21:21.072 running

Qualquer ajuda seria apreciada

Obrigado

Stephane

    
por user249771 19.02.2014 / 03:41

1 resposta

0

De acordo com isso guia de DNS

os arquivos devem começar com db. *

por exemplo edite isso

zone "57.168.192.in-addr.arpa" {

type master;

file "/etc/bind/zones/rev.57.168.192.in-addr.arpa";

};

para

zone "57.168.192.in-addr.arpa" {

type master;

file "/etc/bind/zones/db.rev.57.168.192.in-addr.arpa";

};

e renomeie o arquivo rev.57.168.192.in-addr.arpa para db.rev.57.168.192.in-addr.arpa e isso

zone "example.com" {

type master;

file "/etc/bind/zones/example.com.db";

};

deve ser

zone "example.com" {

type master;

file "/etc/bind/zones/db.example.com";

};

e o arquivo deve ser denominado db.example.com, em vez de example.com.db

você também deve ter o comando sudo named-checkconf para verificar a configuração

    
por nkvnkv 20.05.2014 / 21:19