I am using java.util.Zip and java.util.ZipEntry to successfully extra a zip file\'s contents to disk. I would like to maintain the file permissions set when extracting on a
As tracked in this OpenJDK bug: https://bugs.openjdk.java.net/browse/JDK-6194856:
The "standard" zip file format does not have any way to store "executable file" meta-information, since it was originally designed for MS-DOS filesystems.
In order to preserve Unix information like file modes, the zip handling code would have to handle extensions to the zip file format. Other zip implementations have such extensions.
There are some extensions to the file format that would allow maintaining this kind of information, but it can never be guaranteed (there is no requirement that zip files contain such "extended" metadata) and it would be a lot of work to implement and (especially!) test.
Also see this answer: Can i store unix permissions in a zip file (built with apache ant)?
Non-standard Java libraries may implement this (such as apache-commons).