zeroturnaround / zt-zip

ZeroTurnaround ZIP Library
http://www.zeroturnaround.com/
Apache License 2.0
1.38k stars 251 forks source link

Make retaining File-System-Permissions configurable #132

Open DaniEll-AT opened 4 years ago

DaniEll-AT commented 4 years ago

I want to transfer a whole directory from one Linux system to another. To do this, i tried

The Problem is, I don't want to retain file system permissions and it does not work with my setup (POSIX Operation not Permitted). Currently there seems to be no way to disable it?

(I wrote a custom Unpacker as a workaround)

toomasr commented 4 years ago

I see that the default implementation of ZipEntryCallback is org.zeroturnaround.zip.ZipUtil.Unpacker which honours the permissions https://github.com/zeroturnaround/zt-zip/blob/master/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1154

I feel that a way to disable it is a good idea but not sure when I will get around do it.