Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-657

'puppetserver foreground' uses wrong HOME directory and can fail to start under sudo

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: SERVER 2.0.0
    • Fix Version/s: SERVER 1.1.0, SERVER 2.1.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Sub-team:
    • Story Points:
      1
    • Sprint:
      Server Emerald 2015-05-27

      Description

      puppetserver foreground blows-up on Ubuntu 14.04 with the following error:

      Errno::EACCES: Permission denied - /root/.puppetlabs

      This error does not occur on Redhat 6 or 7.

      For Puppet Server 2.x, running puppetserver foreground on top of Puppet-Agent 1.0.0 (Puppet 4.0) would fail with this error. I suspect that the same error may not have happened if Puppet-Agent 1.1.0 (Puppet 4.1) were installed on the host because the logic that tries to create the directory which causes the failure was reworked.

      For Puppet Server 1.x, none of the logic which tries to create this directory was in place so the command did not fail.

      The investigation for this ticket uncovered that for both Puppet Server 1.x and Puppet Server 2.x, running the foreground command via sudo - which is what would happen on sudo - would result in the process being run with the effective HOME directory of the original user rather than that of the "puppet" user, which is how Puppet Server is run as a service. This problem was fixed for both Puppet Server 1.x and Puppet Server 2.x.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              erik Erik Dasher
              Reporter:
              kevin.corcoran Kevin Corcoran
              QA Contact:
              Erik Dasher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support