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

Description

Test this on a *nix machine. Create a file and use chmod to mark it as executable

Then use Lucee's cfzip tag to create a zip out of that folder.

If you look inside the new zip file, you see the foo file is no longer executable. This is causing big issues in CommandBox where users may package executable binaries to be installed and the executable flags get dropped which makes the binaries non longer work once they're installed since move packages in and out of zip files.

I have tested on Adobe CF 2016 and it does NOT preserve the executable bits however I believe this is clearly a bug and I will be entering an Adobe ticket as well.

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...)

Environment

None

Activity

Zac Spitzer 
19 February 2022 at 11:52

disabled failing test

Zac Spitzer 
1 July 2021 at 13:36
(edited)

I added a test case for this.

one thing I noticed is we don’t return the mode for zip action=”list”

I then added a second file to the test, which isn’t set to execute and it’s being unzipped with an execute flag set?

also directoryList isn’t returning any mode information?? (ok so that’s a silly ACF compat bug as per something we should change for lucee6 I think)

Michael Offner 
16 August 2019 at 08:55

done thanks for the input

Zac Spitzer 
16 August 2019 at 08:39

if you release a new version of the extension, can you include these PRs?

Michael Offner 
16 August 2019 at 08:05

we are not using the zip library coming with the JRE because it has to many limitation

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 13 December 2018 at 20:20
Updated 19 February 2022 at 11:52