Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282906 - app-arch/zip-2.32-r1 gives incorrect permissions when repairing broken files
Summary: app-arch/zip-2.32-r1 gives incorrect permissions when repairing broken files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-27 13:29 UTC by A.C.Heron
Modified: 2009-09-21 09:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A.C.Heron 2009-08-27 13:29:56 UTC
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
Comment 1 A.C.Heron 2009-09-21 09:40:34 UTC
Upgrading to app-arch/zip-3.0 seems to have solved the problem.