How to Fix “/etc/rndc.key: permission denied” for named Service Error

Symptoms :

I keep getting this error every time I try to start the named daemon service :

    [root@centos62 ~]# service named start
    Starting named:                                            [FAILED]
    

Then i checked at the /var/log/messages, i get the following messages :

    [root@centos62 ~]# tail -f /var/log/messages
    
    Feb  6 21:51:22 centos62 named[1341]: loading configuration from '/etc/named.conf'
    Feb  6 21:51:22 centos62 named[1341]: /etc/named.conf:7: open: /etc/rndc.key: permission denied
    Feb  6 21:51:22 centos62 named[1341]: loading configuration: permission denied
    Feb  6 21:51:22 centos62 named[1341]: exiting (due to fatal error)
    

Solutions :
Change the owner and the files permission of the ‘/etc/named.conf’ :

    [root@centos62 ~]# chown named:named /etc/rndc.key
    [root@centos62 ~]# chmod 644 /etc/rndc.key
    

Start named services :

    [root@centos62 ~]# service named start
    Starting named:                                            [  OK  ]
    
1 comment
  1. Nurlan
    Nurlan
    September 27, 2013 at 3:18 pm

    f**king perfect!! thank you man, u helped me! working on centos 6.4

    Reply
Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee