couldn't open pid file '/var/run/named.pid': Permission denied

Agnello George agnello.dsouza at gmail.com
Thu Nov 15 05:08:24 UTC 2007


HI
I have installed  installed bind 9.5.-dlz on FC7.

When i am trying to start named it gives me the following error :

[root at bind ~]# tail -f /var/log/messages
Nov 15 15:47:11 bind named[15378]: automatic empty zone:
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: automatic empty zone: D.F.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: automatic empty zone: 8.E.F.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: automatic empty zone: 9.E.F.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: automatic empty zone: A.E.F.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: automatic empty zone: B.E.F.IP6.ARPA
Nov 15 15:47:11 bind named[15378]: command channel listening on
127.0.0.1#953
Nov 15 15:47:11 bind named[15378]: command channel listening on ::1#953
Nov 15 15:47:11 bind named[15378]: couldn't open pid file
'/var/run/named.pid': Permission denied
Nov 15 15:47:11 bind named[15378]: exiting (due to early fatal error)

following is the permission on my machine :
[root at bind ~]# ll /var/run/named.pid
lrwxrwxrwx 1 root root 41 2007-11-14 23:51 /var/run/named.pid ->
/var/named/chroot/var/run/named/named.pid

[root at bind ~]# ll /var/named/chroot/var/run/named/named.pid
-rw-r--r-- 1 named named 0 2007-11-15 15:57
/var/named/chroot/var/run/named/named.pid

my /etc/named.conf file looks like this :

#################################################
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//

options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        pid-file        "/var/run/named.pid";  ===== > ( even if i change it
to /var/named/chroot/var/run/named/named.pid it give same error )
        memstatistics-file
"/var/named/chroot/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

include "/etc/named.rfc1912.zones";
dlz "Mysql zone" {
   database "mysql
   {host=127.0.0.1 dbname=binddlzdb  user=binddlzuser pass=binddlzpassword}
   {select zone from records where zone = '%zone%'}
{select ttl, type, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"')
 else data end from records where zone = '%zone%' and host = '%record%'
        and not (type = 'SOA' or type = 'NS')}
{select ttl, type, mx_priority, data, resp_contact, serial, refresh, retry,
expire, minimum
        from records where zone = '%zone%' and (type = 'SOA' or type='NS')}
{select ttl, type, host, mx_priority, data, resp_contact, serial, refresh,
retry, expire,
        minimum from records where zone = '%zone%' and not (type = 'SOA' or
type = 'NS')}
{select zone from xfr where zone = '%zone%' and client = '%client%'}
{update data_count set count = count + 1 where zone ='%zone%'}";
};
#############################################################################

can some one tell me where i have made the error ... thanks :-)

-- 

Agnello . G .Dsouza




More information about the bind-users mailing list