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



    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • SERVER 2.0.0
    • SERVER 1.1.0, SERVER 2.1.0
    • None
    • None


      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.


        Issue Links



              erik Erik Dasher
              kevin.corcoran Kevin Corcoran
              Erik Dasher Erik Dasher
              0 Vote for this issue
              3 Start watching this issue



                Zendesk Support