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

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Won't Do
    • PUP 3.4.0, PUP 3.4.1, PUP 3.4.2
    • None
    • Windows

    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

              Unassigned Unassigned
              ethan Ethan Brown
              Erik Dasher Erik Dasher
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support