My fix below for IPv4 (new /etc/init/isc-dhcp-server.conf)

My take on the problem is:
- Not a apparmor issue.
- The permissions on /var/run is 755, so writable by root only.
- dhcpd tries to write it's pid file after it has dropped root permissions.
- Existing method to get around this
  (from looking at the current /etc/init/isc-dhcp-server.conf upstart file)
  is to create an dhcp-server directory and enable the ownership/permissions on 
that.
- The upstart conf script is broken and doesn't do this properly.
   - It only creates this directory and sets these permissions on 'restart'(?)
   - It doesn't tell 'dhcpd where is should write it's pid, which defaults to 
/var/run/dhcpd.pid.

Also: /var/run is being migrated to /run, so I have included that
change.

See the attache file for my rework of the upstart script which appears to work 
for me.
I can start, stop, restart with appropriate messages if I try to start a 
running service, or stop a stopped service.


** Attachment added: "/etc/init/isc-dhcp-server.conf"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/985417/+attachment/3104383/+files/isc-dhcp-server.conf

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/985417

Title:
  dhcpd cannot write  /var/run/dhcpd.pid

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to