Quantcast
Channel: Need to allow a user to restart bind9 - Server Fault
Viewing all articles
Browse latest Browse all 6

Need to allow a user to restart bind9

$
0
0

I want to give the www-data user the ability to restart bind9 using this command

service bind9 restart

At the moment, they can execute it and it will stop bind9 but not restart it again complaining that permissions will not allow a chmod of the file "named".

can you point me in the direction of what i need to do

Update

Okay so I added the line to the sudoers as requested.

www-data      ALL=NOPASSWD: /etc/init.d/bind9

It still has some issue:

root@LAMPREY:~# su www-data$ service bind9 restart * Stopping domain name service... bind9                                        rndc: error: none:0: open: /etc/bind/rndc.key: permission deniedrndc: could not load rndc configuration                                                                         [ OK ] * Starting domain name service... bind9                                        chmod: changing permissions of `/var/run/named': Operation not permitted$ exit

I also then tried running another command

/etc/init.d/bind9 restart * Stopping domain name service... bind9                                        rndc: error: none:0: open: /etc/bind/rndc.key: permission deniedrndc: could not load rndc configuration                                                                         [ OK ] * Starting domain name service... bind9                                        chmod: changing permissions of `/var/run/named': Operation not permitted$ exit

with the same result


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images