<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    For now, I am working around this issue by telling dhcpd not to fork
    (-f option) and instead forking the shell (append ' &' to the
    command line).<br>
    <br>
    On 1/6/2020 2:02 PM, Jay Foster wrote:<br>
    <blockquote type="cite"
      cite="mid:3c80ee93-be84-785d-07cc-c2e1b4995b94@systech.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      dhcpd is running as root whether or not it forks (evidenced by
      ps).  I do not see how forking or not forking has any bearing on
      permissions.  dhcpd does not report any errors writing the leases
      file (daemon.info dhcpd: Wrote 1 leases to leases file.).<br>
      <br>
      For grins, I chown dhcp:dhcp both the leases file and .conf file. 
      Makes no difference.  Also tried adding '-user dhcp -group dhcp'. 
      Also makes no difference.<br>
      <br>
      There is no evidence of any kind of a permissions issue.  strace
      shows that dhcpd creates 3 child processes via clone(2).  These
      processes seem to be associated with the dhcp_context_create(),
      omapi_init(), etc. function calls.  In the forking case, these get
      terminated along with the parent process after the fork(2), but
      obviously do not when not forking.  That is the only difference
      that I see between the forking and non-forking invocations.<br>
      <br>
      <div class="moz-cite-prefix">On 1/6/2020 1:49 PM, Christopher
        Barry wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CAOajpmq43V72OCZ8bvNmE9jiAHQo6qofFNb61E9+=14iCPKYUQ@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div dir="auto">Generally, when backgrounded, dhcpd runs with
          reduced privs, e.g. as dhcpd:dhcpd (your configured user/group
          may be different). Can you su as that user and run dhcpd in
          the foreground? I'm suspecting that user may not have write
          perms to the leases file.
          <div dir="auto"><br>
          </div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, Jan 6, 2020, 4:15 PM
            Jay Foster <<a href="mailto:jay@systech.com"
              moz-do-not-send="true">jay@systech.com</a>> wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Can you be more
              specific?  /usr/sbin/dhcpd is root:root.  /usr/sbin/dhcpd
              is being run as root.<br>
              <br>
              <div>On 1/6/2020 12:58 PM, Christopher Barry wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="auto">Make sure user/group perms are valid.
                  <div dir="auto"><br>
                  </div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Mon, Jan 6, 2020,
                    1:42 PM Jay Foster <<a
                      href="mailto:jay@systech.com" target="_blank"
                      rel="noreferrer" moz-do-not-send="true">jay@systech.com</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">I
                    am using the ISC DHCP server (dhcpd) version 4.3.6
                    from a rocko Yocto <br>
                    build.  When dhcpd is started without the '-f' or
                    '-d' options (forks to <br>
                    the background) it does not work.  DHCP DISCOVER
                    requests are sent, but <br>
                    the dhcpd application does not respond.  I can
                    attach strace to the <br>
                    dhcpd process and see that dhcpd just sleeps in an
                    futex() call.<br>
                    <br>
                    If I start dhcpd with either the '-f' or '-d'
                    options so it does not <br>
                    fork, then it works properly.<br>
                    <br>
                    I have run dhcpd (both forking and non forking)
                    using strace to see if I <br>
                    could spot any differences.  The only thing I notice
                    is that when <br>
                    forking, the parent process terminates (expected)
                    along with 3 other <br>
                    child processes/threads.  It looks like these other
                    threads are supposed <br>
                    to handle the ISC tasks/messages, but are not cloned
                    by the fork and are <br>
                    not present after forking.<br>
                    <br>
                    For reference, with an older version of ISC DHCP
                    server (4.1.1-P1) on an <br>
                    older product, this problem does not occur.<br>
                    <br>
                    Any ideas where to look?<br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    _______________________________________________<br>
                    dhcp-users mailing list<br>
                    <a href="mailto:dhcp-users@lists.isc.org"
                      rel="noreferrer noreferrer" target="_blank"
                      moz-do-not-send="true">dhcp-users@lists.isc.org</a><br>
                    <a
                      href="https://lists.isc.org/mailman/listinfo/dhcp-users"
                      rel="noreferrer noreferrer noreferrer"
                      target="_blank" moz-do-not-send="true">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
                  </blockquote>
                </div>
                <br>
                <fieldset></fieldset>
                <pre>_______________________________________________
dhcp-users mailing list
<a href="mailto:dhcp-users@lists.isc.org" target="_blank" rel="noreferrer" moz-do-not-send="true">dhcp-users@lists.isc.org</a>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank" rel="noreferrer" moz-do-not-send="true">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org" moz-do-not-send="true">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users" moz-do-not-send="true">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>