This is still ongoing.
I've tried 

- /etc/init/isc-dhcp-server.conf

   # The leases files need to be root:root even when dropping privileges
    [ -e /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases
    #SM 2015-05-08 chown root:root /var/lib/dhcp /var/lib/dhcp/dhcpd.leases
    chown dhcpd:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd.leases
    if [ -e /var/lib/dhcp/dhcpd.leases~ ]; then
    #SM 2015-05-08    chown root:root /var/lib/dhcp/dhcpd.leases~
        echo "Chown DHCPD to fix brokenness"
        chown dhcpd:dhcpd /var/lib/dhcp/dhcpd.leases~
    fi

- /etc/init.d/isc-dhcp-server
...
        start)
                test_config
                log_daemon_msg "Starting $DESC" "$NAME"
                log_daemon_msg "chown dhcpd /var/lib/dhcp/*"
                # SM 2015-08-05 chown dhcpd /var/lib/dhcp/*
                chown dhcpd /var/lib/dhcp/*
...

        restart | force-reload)
                test_config
                $0 stop
                sleep 2
                $0 start
                if [ "$?" != "0" ]; then
                        exit 1
                fi
                #SM 1015-05-08
                chown dhcpd /var/lib/dhcp/*
                ;;
...

-.) Apparmor in to complain mode
mv /etc/apparmor.d/usr.sbin/usr.sbin.dhcpd /etc/apparmor.d/force-complain/


-.)/lib/systemd/system/isc-dhcp-server.service
#   SM 2015-05-08 chown root:root /var/lib/dhcp /var/lib/dhcp/dhcpd.leases*; \
    chown dhcpd:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd.leases*; \

followed by systemctl daemon-reload

and modifying systemd finally broke it:

systemctl status isc-dhcp-server.service 
● isc-dhcp-server.service - ISC DHCP IPv4 server
   Loaded: error (Reason: Invalid argument)
   Active: active (running) since Fri 2015-05-08 09:42:02 BST; 14min ago
     Docs: man:dhcpd(8)
 Main PID: 14253 (dhcpd)
   CGroup: /system.slice/isc-dhcp-server.service
           └─14253 dhcpd -user dhcpd -group dhcpd -f -4 -pf 
/run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf eth0...

May 08 09:42:02 here dhcpd[14253]: Server starting service.
May 08 09:42:02 here sh[14253]: Listening on 
LPF/eth0/00:9c:02:a0:38:67/192.168.1.0/24
May 08 09:42:02 here sh[14253]: Sending on   
LPF/eth0/00:9c:02:a0:38:67/192.168.1.0/24
May 08 09:42:02 here sh[14253]: Sending on   Socket/fallback/fallback-net
May 08 09:42:32 here systemd[1]: 
[/lib/systemd/system/isc-dhcp-server.service:17] Trailing garbage, ignoring.
May 08 09:42:32 here systemd[1]: isc-dhcp-server.service lacks both ExecStart= 
and ExecStop= setting. Refusing.
May 08 09:43:04 here systemd[1]: 
[/lib/systemd/system/isc-dhcp-server.service:17] Trailing garbage, ignoring.
May 08 09:43:04 here systemd[1]: isc-dhcp-server.service lacks both ExecStart= 
and ExecStop= setting. Refusing.
May 08 09:46:58 here systemd[1]: 
[/lib/systemd/system/isc-dhcp-server.service:17] Trailing garbage, ignoring.
May 08 09:46:58 here systemd[1]: isc-dhcp-server.service lacks both ExecStart= 
and ExecStop= setting. Refusing.
root@here:/etc/init.d# 

PLEASE can someone tell me how this has persisted since 2013 ?!?!?!

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1186662

Title:
  isc-dhcp-server fails to renew lease file

Status in isc-dhcp package in Ubuntu:
  Triaged
Status in isc-dhcp source package in Trusty:
  Confirmed

Bug description:
  After raring upgrade, the dhcp server fails to renew lease file when
  it tries to (about every hour).

  The syslog says:
  dhcpd: Can't create new lease file: Permission denied

  It looks like a permission problem, because

  # chown -R dhcpd:dhcpd /var/lib/dhcp

  the above command temporarily solves the issue, until dhcpd is
  restarted: at that time, the ownership of the directory and the lease
  file is set back to root:root.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1186662/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to