Open
Description
Describe the bug
When creating a zip archive with the Zip task, directory permission is 777 inside the archive.
Steps To Reproduce
<zip includeemptydirs="true" destfile="dist/${package}" basedir="./build">
<fileset dir="build">
<include name="**/**"/>
</fileset>
</zip>
Expected behavior
Store original permissions bits or no extended attributes at all like it can be done with the zip command -X
option
Screenshots / terminal output
If applicable, add screenshots or terminal output to help explain your problem.
list of extracted archive made with the ZipTask:
drwxrwxrwx 3 lea lea 4096 Apr 23 15:22 controllers
-rw-r--r-- 1 lea lea 302 Apr 18 16:00 index.php
-rw-r--r-- 1 lea lea 619 Apr 23 15:21 logo.gif
-rw-r--r-- 1 lea lea 1484 Apr 23 15:21 logo.png
drwxrwxrwx 2 lea lea 4096 Apr 23 15:22 sql
drwxrwxrwx 5 lea lea 4096 Apr 23 15:22 src
drwxrwxrwx 2 lea lea 4096 Apr 23 15:22 translations
drwxrwxrwx 5 lea lea 4096 Apr 23 15:22 views
This over permissive dangerous permissions on directory is not wanted at all.
Additional context
creating the very same zip archive with the zip
command creates a zip archive that extracts perfectly well as expected:
drwxr-xr-x 3 lea lea 4096 Apr 18 16:00 controllers
-rw-r--r-- 1 lea lea 302 Apr 18 16:00 index.php
-rw-r--r-- 1 lea lea 619 Apr 23 15:21 logo.gif
-rw-r--r-- 1 lea lea 1484 Apr 23 15:21 logo.png
drwxr-xr-x 2 lea lea 4096 Apr 23 16:24 sql
drwxr-xr-x 5 lea lea 4096 Apr 18 16:00 src
drwxr-xr-x 2 lea lea 4096 Apr 23 16:24 translations
drwxr-xr-x 5 lea lea 4096 Apr 18 16:00 views
Workaround with the zip
command:
<exec executable="zip" description="Create zip archive" dir="build">
<arg value="-r9FSX" />
<arg value="${project.basedir}/dist/${package}" />
<arg value="${baseName}" />
</exec>
Metadata
Metadata
Assignees
Labels
No labels