tracker issue : CF-4203755

select a category, or use search below
(searches all categories and all time range)

executable bit is lost on files when using cfzip action=zip on binaries

| View in Tracker

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.

Also, here are some other references to java classes for dealing with permissions on Posix file systems.,%20java.util.Set),%20java.nio.file.LinkOption...)