[Bug 985417] Re: dhcpd cannot write /var/run/dhcpd.pid

Barry Warsaw 985417 at bugs.launchpad.net
Sat May 19 21:22:56 UTC 2012


I just encountered the same problem.  I did two things to work around
this:

% cd /etc
% bzr diff
=== modified file 'apparmor.d/usr.sbin.dhcpd'
--- apparmor.d/usr.sbin.dhcpd   2012-05-18 01:12:29 +0000
+++ apparmor.d/usr.sbin.dhcpd   2012-05-19 21:10:55 +0000
@@ -32,7 +32,7 @@
   /var/lib/dhcp/dhcpd{,6}.leases* lrw,
   /var/log/ r,
   /var/log/** rw,
-  /{,var/}run/{,dhcp-server/}dhcpd{,6}.pid w,
+  /{,var/}run/{,dhcp-server/}dhcpd{,6}.pid rw,
 
   # LTSP. See:
   # http://www.ltsp.org/~sbalneav/LTSPManual.html

=== modified file 'dhcp/dhcpd.conf'
--- dhcp/dhcpd.conf     2012-05-19 21:01:43 +0000
+++ dhcp/dhcpd.conf     2012-05-19 21:09:07 +0000
@@ -31,7 +31,7 @@
 # have to hack syslog.conf to complete the redirection).
 log-facility local7;
 
-pid-file-name "/var/run/dhcp-server/dhcpd.pid";
+pid-file-name "/run/dhcp-server/dhcpd.pid";
 
 subnet xxx.xxx.xxx.0 netmask 255.255.255.0 {
     option routers xxx.xxx.xxx.xxx;

I honestly don't know whether this is the *right* thing to do, but it
works for me (please let me know if I'm opening massive vulnerabilities
:).

I think there are possibly two bugs here.   The first would be that the
default pid file for dhcpd puts it in a location that isn't writable.
The second is that even after relocating the pid file, the apparmor
setting doesn't allow for reading the pid file.

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

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

Status in “isc-dhcp” package in Ubuntu:
  Confirmed

Bug description:
  Description:	Ubuntu precise (development branch)
  Release:	12.04
  ---

  isc-dhcp-server:
    Telepítve: 4.1.ESV-R4-0ubuntu5
    Jelölt:    4.1.ESV-R4-0ubuntu5
    Verziótáblázat:
   *** 4.1.ESV-R4-0ubuntu5 0
          500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
          100 /var/lib/dpkg/status
  ---
  when starting dhcpd the following can be observed in syslog:

  Apr 19 08:09:09 u3 dhcpd: Internet Systems Consortium DHCP Server 4.1-ESV-R4
  Apr 19 08:09:09 u3 dhcpd: Copyright 2004-2011 Internet Systems Consortium.
  Apr 19 08:09:09 u3 dhcpd: All rights reserved.
  Apr 19 08:09:09 u3 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
  Apr 19 08:09:09 u3 dhcpd: Internet Systems Consortium DHCP Server 4.1-ESV-R4
  Apr 19 08:09:09 u3 dhcpd: Copyright 2004-2011 Internet Systems Consortium.
  Apr 19 08:09:09 u3 dhcpd: All rights reserved.
  Apr 19 08:09:09 u3 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
  Apr 19 08:09:09 u3 dhcpd: Wrote 0 leases to leases file.
  Apr 19 08:09:09 u3 dhcpd: Can't create PID file /var/run/dhcpd.pid: Permission denied.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: isc-dhcp-server 4.1.ESV-R4-0ubuntu5
  ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
  Uname: Linux 3.2.0-23-generic x86_64
  ApportVersion: 2.0.1-0ubuntu4
  Architecture: amd64
  Date: Thu Apr 19 08:09:16 2012
  DhServerLeases:
   
  InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Beta amd64 (20120417)
  SourcePackage: isc-dhcp
  UpgradeStatus: No upgrade log present (probably fresh install)
  mtime.conffile..etc.dhcp.dhcpd.conf: 2012-04-19T08:09:04.598083

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




More information about the foundations-bugs mailing list