-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: pipeline-utility-steps-plugin
-
None
-
Environment:Jenkins 2.107.3
Pipeline Utility Steps 2.1.0
Run this pipeline:
node() {
   // create an example ZIP file
   sh '''\
       base64 -d > test.zip << EOF
       UEsDBAoAAAAAAJ2SrkwAAAAAAAAAAAAAAAAIABwAdGVzdC5iaW5VVAkAA1qp+VpaqfladXgLAAEE
       6AMAAAToAwAAUEsBAh4DCgAAAAAAnZKuTAAAAAAAAAAAAAAAAAgAGAAAAAAAAAAAAP2BAAAAAHRl
       c3QuYmluVVQFAANaqfladXgLAAEE6AMAAAToAwAAUEsFBgAAAAABAAEATgAAAEIAAAAAAA==
       EOF'''.stripIndent()
   sh 'unzip -o test.zip && ls -l test.bin && rm test.bin'
   unzip zipFile: 'test.zip', quiet: true
   sh 'ls -l test.bin'
}
The (relevant) output is:
+ ls -l test.bin -rwxrwxr-x 1 jenkins jenkins 0 May 14 15:20 test.bin ... + ls -l test.bin -rw-r--r-- 1 jenkins jenkins 0 May 14 15:51 test.bin
You can see that the native unzip program extracts the file with the permissions it actually has in the archive (775), while the unzip step extracts it with default permissions (644).
- relates to
-
JENKINS-53874 ZipArchiver should set the type bits when setting the Unix mode
-
- Open
-