If you have unpacked a deployment bundle, called the installer script inside it and got
back "permission denied", the first suspect is usually the archive: was the bit wrong on
the machine that packed it, or does zip simply not carry the execute permission?
It carries it. A zip archive holds the Unix mode for every entry; the tool that opens the
archive is the one that loses it. Opening the same archive on the same machine with two
tools gave me -rwxr-xr-x in one case and -rw-r--r-- in the other. The archive was
identical both times. And the mode that landed on disk did not come from the archive at
all β it came from the umask of the machine doing the extraction .
The irritating part is that this is written down nowhere. On Python's zipfile
documentation page β on both of today's pages, 3.13.18 and 3.15.2 β the word "permission"
does not appear at all .β¦