Is there a way to invoke unzip (from Info-ZIP) on a Linux system without having it restore the permissions stored in the zip file? The zip files I'm restoring are enormous, so going back over the contents with something like "chmod -R" will take a while. I do not control the source of the archives, so my only choice is to handle the permissions on extraction.
Restoring permissions is a feature of
unzip (from the
man page, version 6.00):
Dates, times and permissions of stored directories are not restored except under Unix. (On Windows NT and successors, timestamps are now restored.)
and there is no option to switch if off.
It might be that an older version of
unzip did not support restoring permission, but investigating that route is probably more cumbersome than trying to change the latest
unzip source to do what you want.
chmod -R is unacceptable you can take a look at using Python's zipfile library, it is easy to use and gives you full control over the way you write the files that you extract from the zip file.