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

Eradicate usage of FileUtils / File .chmod and move to the FileSystem abstraction

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 3.4.0, PUP 3.4.1, PUP 3.4.2
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:

      Description

      The built-in Ruby classes FileUtils.chmod and File.chmod do not behave correctly under Windows.

      We do however have a nice method Puppet::Util::Windows::Security.set_mode(mode, path) that does it's best job to simulate a POSIX mode and roundtrip it properly.

      All call sites that use the Ruby methods should be updated to use a new Puppet::FileSystem.chmod that delegates properly to the appropriate OS specific method.

      This should be a fairly mechanical change to the codebase.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ethan Ethan Brown
                QA Contact:
                Erik Dasher
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support