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

file resource sets insane permissions on plain files if directory setgid bit is set and recurse is true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
    • Template:
    • Team:
      Coremunity

      Description

      If a file resource for a directory is set with recurse => true and mode '2644', the setgid bit is correctly set on all directories in the tree (along with the execute/search bit, so 2755 for directories), but plain files have the setgid bit set as well (2644), which is definitely not desirable. There seems to be no way to just set the setgid bit for directories.

      I'm not sure what the best resolution for this is, since it's a symptom of overloading the file resource to handle directories, but I think this is probably not an uncommon use case, since it's frequently desirable to setgid on directories in multiuser environments. Maybe a separate optional 'dmode' attribute for directories?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              durist Daniel Urist
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support