Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

please help me, i screw my server.

root@...:/etc/apache2/sites-available# dpkg --configure -a
Setting up bind9 (1:9.7.0.dfsg.P1-1ubuntu0.8) ...
 * Starting domain name service... bind9                                                     [fail]
invoke-rc.d: initscript bind9, action "start" failed.
dpkg: error processing bind9 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 bind9
[Exit 1]

I was installing vsftpd, but something didn't worked so i killed manually the processes involved.

How can i fix that without doing purge bind9? With the purge he removes too many things!

my server

Ubuntu 10.04.4 LTS

my syslog (only the part with bind9)

Nov  1 15:51:39 vm1613 kernel: [14854477.963366] type=1505 audit(1351781499.689:101):  operation="profile_replace" pid=1579 name="/usr/sbin/named"
Nov  1 15:51:39 vm1613 named[1612]: starting BIND 9.7.0-P1 -t /var/named/run-root -c /etc/named.conf -u bind
Nov  1 15:51:39 vm1613 named[1612]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Nov  1 15:51:39 vm1613 named[1612]: adjusted limit on open files from 1024 to 1048576
Nov  1 15:51:39 vm1613 named[1612]: found 1 CPU, using 1 worker thread
Nov  1 15:51:39 vm1613 named[1612]: using up to 4096 sockets
Nov  1 15:51:39 vm1613 named[1612]: loading configuration from '/etc/named.conf'
Nov  1 15:51:39 vm1613 named[1612]: none:0: open: /etc/named.conf: permission denied
Nov  1 15:51:39 vm1613 named[1612]: loading configuration: permission denied
Nov  1 15:51:39 vm1613 named[1612]: exiting (due to fatal error)
Nov  1 15:51:39 vm1613 kernel: [14854477.992579] type=1503 audit(1351781499.719:102):  operation="open" pid=1613 parent=1611 profile="/usr/sbin/named" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/var/named/run-root/etc/named.conf"

/var/log/messages

Nov  1 15:51:39 vm1613 kernel: [14854477.963366] type=1505 audit(1351781499.689:101):  operation="profile_replace" pid=1579 name="/usr/sbin/named"
Nov  1 15:51:39 vm1613 kernel: [14854477.992579] type=1503 audit(1351781499.719:102):  operation="open" pid=1613 parent=1611 profile="/usr/sbin/named" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/var/named/run-root/etc/named.conf"
share|improve this question
add comment

1 Answer

Your issue is in the syslog.. Permission Denied.

On our systems, named is owned by root and is a member of the bind group.

@ns2:/etc/bind$ ls -al named.conf -rw-r--r-- 1 root bind 486 2012-05-08 13:24 named.conf

@ns2:/etc/bind$ ps aux | grep bind root 9680 0.0 0.1 327344 42184 ? Ssl Oct23 2:11 /usr/sbin/named -c /etc/bind/named.conf

First steps is see what the permissions and owner/group is set for the named.conf

Second step is to see what user named is running as and make sure things match up.

Once you figure that out and update where necessary, restart named and things should be working properly. If not, post your updated findings back here.

-Brendan

share|improve this answer
    
'bind9 restart' seems working now following this answer serverfault.com/questions/239021/…. Is it bad to add that permission to apparmor? –  apelliciari Nov 1 '12 at 15:14
    
Probably wouldn't hurt, but we do not run apparmor here so I can't give you a solid answer one way or another. –  bmurtagh Nov 1 '12 at 15:16
    
thank you for your help!! –  apelliciari Nov 1 '12 at 15:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.