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

file provider silent behaviour change for "mode"


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.5.0
    • Fix Version/s: None
    • Component/s: Docs
    • Template:
    • UX Priority:


      The type reference for file in Puppet 0.25.5 said:

      file { '/some/dir':
        mode => 644,
        recurse => true,

      Ref: http://docs.puppetlabs.com/references/0.25.5/type.html#file

      I believe that there are many Puppet manifests out there that still writes file mode as 3-digit numbers and expect them to be interpreted as octal.

      Starting with Puppet 3.5.0 (using future parser), this would set the mode to 1204 instead of the intended 0644. The mode 755 becomes 1363 – which means that the file is world writable.

      I know that for a long time the documentation says that the mode should be specified as a four-digit octal value. But it doesn't say that it has to be a string. Specifying 4711 used to make a file setuid; starting in Puppet 3.5.0 is produces the nonsensical error message "The file mode specification is invalid: 4711".

      There has never been any deprecation warnings, so code written by the ancient documentation now suddenly behaves differently. Files that were supposed to be read-only can now become writable by everybody on the system.

      At the very least, this should have been mentioned in the release notes.


          Issue Links



              • Assignee:
                nick.fagerlund Nicholas Fagerlund
                ceder Per Cederqvist
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created:

                  Zendesk Support