Status/Resolution/Reason: Needs Review//HaveNewInfo
Reporter/Name(from Bugbase): Bradley Wood / ()
Created: 12/13/2018
Components: Language
Versions: 2018
Failure Type: Others
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / All users will encounter
Locale/System: / Platforms All
Vote Count: 0
Test this on a *nix machine. Create a file and use chmod to mark it as executable
touch foo
chmod a+x foo
Then use the cfzip tag to create a zip out of that folder.
cfzip( action='zip', source=arguments.packageFolder, file=thisArtifactPath );
If you look inside the new zip file, you see the foo file is no longer executable.
At first it appeared that the zip format didn't support this, but upon further research, there does seem to be a way to embed the permissions into the file in such a way they are preserved. I can confirm that I can create zip files with Apache Ant that do preserve executable bits when unzipped on a Posix file system so it is possible.
https://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/434689#434689
Also, here are some other references to java classes for dealing with permissions on Posix file systems.
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#setPosixFilePermissions(java.nio.file.Path,%20java.util.Set)
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#getPosixFilePermissions(java.nio.file.Path,%20java.nio.file.LinkOption...)
Attachments:
Comments: