Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1742

Specifying mode in puppet.conf creates incorrect file permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: PUP 3.3.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1

      Description

      I've tested as far back as 3.1.0, but I suspect that we've had this wrong since 2.6. Josh Cooper tracked the problem down to a commit (b268fb3d4c) for redmine issue #7144. Unfortunately the change caused it to interpret a mode string as a decimal. This means that a mode of "0644" results in an actually applied mode of "0204".

      To reproduce

      Create a puppet.conf that contains:

      signeddir = $cadir/signed { mode = 0644 }
      

      Delete the ssldir:

      rm -rf `puppet config print ssldir --section master`
      

      Run the master

      puppet master --no-daemonize --debug
      

      The master will error with:

      Error: Could not run: Permission denied - /Users/andy/.puppet/ssl/ca/signed/aparker.corp.puppetlabs.net.pem
      

      And a look at that directory will show the incorrect permissions:

      > ls -l /Users/andy/.puppet/ssl/ca/signed/aparker.corp.puppetlabs.net.pem
      --w----r--  1 andy  staff  2090 Feb 20 15:43 /Users/andy/.puppet/ssl/ca/signed/aparker.corp.puppetlabs.net.pem
      

      Expected

      The permissions on the created file should be 0644

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andy Andrew Parker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support