Comment 3 for bug 1184914

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I see this all the time:

root@atlas:~# grep dhcpd /var/log/syslog|grep -v DHCP
Sep 8 07:56:54 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 09:04:27 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 10:59:04 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 12:49:18 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 13:57:24 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 15:00:21 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 16:02:56 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 17:17:27 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 18:36:27 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 19:37:46 atlas dhcpd: Can't create new lease file: Permission denied
Sep 8 20:45:15 atlas dhcpd: Can't create new lease file: Permission denied

dhcpd runs as user "dhcpd":
dhcpd 64226 0.0 0.0 26304 7352 ? Ss Sep05 0:03 /usr/sbin/dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid -cf /etc/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth0

The /var/lib/maas/dhcp directory is owned by root, so dhcpd cannot create new files in there:

root@atlas:~# ls -la /var/lib/maas/dhcp -d
drwxr-xr-x 2 root root 4096 Sep 5 19:12 /var/lib/maas/dhcp

The lease file is owned by root, but maybe dhcp starts off as root, opens it, and then drops privileges.