When I repair an incomplete zip archive and unpack it, directory permissions are incorrect: rw-r--r-- instead of more reasonable rwxr-xr-x I don't know which to blame: zip, that incorrectly reconstructs zipfile directory, or unzip which creates reconstructed directories with incorrect permissions. Probably the former. Reproducible: Always Steps to Reproduce: 1. Create a zip archive test.zip: for f in {1..20}; do mkdir $f; echo $f > $f/$f.txt; zip -r test.zip $f; rm -r $f; done 2. Write first 3000 bytes of it to incomplete.zip: dd if=test.zip of=incomplete.zip bs=3000 count=1 3. Repair incomplete.zip zip -F incomplete.zip or zip -FF incomplete.zip (both give the same result here) 4. Unpack incomplete.zip unzip incomplete.zip Actual Results: All created directories have drw-r--r-- permissions. Owner cannot access them without chmod. Expected Results: Directories should have permissions like drwxr-xr-x (as the originals were) or at least drwxr--r--. Observed on numerous versions of zip and unzip up to app-arch/zip-2.32-r1 and app-arch/unzip-5.52-r2
Upgrading to app-arch/zip-3.0 seems to have solved the problem.