Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53874

ZipArchiver should set the type bits when setting the Unix mode

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • core
    • None
    • Jenkins 2.138.1

    Description

      When ZipArchiver sets the Unix mode for files and directories in the archive, it only sets the permission part of the mode, and not the type part. This causes some problems:

      • If you run zipinfo on such an archive, it shows the mode as ?rw-r--r-- - which is harmless, but confusing.
      • Old versions of libarchive can't extract such files (see https://github.com/libarchive/libarchive/issues/441). There might be other extractors that have similar problems.

      FIxing this should be simple enough - just OR the mode with S_IFREG (0100000) for files and S_IFDIR (0040000) for directories.

      Attachments

        Issue Links

          Activity

            rdonchen_intel Roman Donchenko created issue -
            kon Kalle Niemitalo made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-51303 [ JENKINS-51303 ]
            kon Kalle Niemitalo made changes -
            Link This issue relates to JENKINS-64818 [ JENKINS-64818 ]

            People

              Unassigned Unassigned
              rdonchen_intel Roman Donchenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: