Actually, some answers here are not correct. ZIP files can also have file permissions. (*) You can list the permissions of the files in your ZIP file with:
unzip -Z
Maybe the tool you used to create the ZIP file didn't store the permissions or didn't store them correctly.
So, if you made the ZIP file yourself, check the tool you made the ZIP file with. Maybe there is a way to set permissions before zipping (like with maven), or it preserves the original permissions (but that would only work on a system that supports permissions - i.e. not on Windows).
If you didn't make the ZIP file yourself, your only chance is to set the correct the permissions after unzipping, for example with
chmod -R [permissions] [directory]
(*) We use that feature in combination with the maven assembly plugin, where you can specify the fileMode for files that go into the ZIP file.
8@lawl0r yes it does. Use the -Z option to see them. – OrangeDog – 2015-07-27T16:31:24.650
It was actually zipped with window, sorry. – Brett – 2013-06-03T10:31:30.977
1It doesn't matter if it was created on windows or *nix. Zip still doesn't support unix file permissions. Regardless where it was created. – lawl0r – 2013-06-03T10:33:56.767
Yeah, I know.... but you said I could try setting the
umask
so it would create the zip with these permissions; but don't think I can do that on windows? – Brett – 2013-06-03T10:40:03.367Before unziping – lawl0r – 2013-06-03T10:41:10.557
Oh ok..... got a bit confused when you said "so zip should create the files with these permissions". :) – Brett – 2013-06-03T10:49:15.353
I thought in tar terms, where you use the same command to zip and unzip. Edited my answer. – lawl0r – 2013-06-03T11:58:44.187