This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNZIP: Why don't .exe/.dll files get eXecute privs?


Jim Reisert AD1C wrote:
> Here's an example:
> 
> CYGWIN:
> 
> 
> c:\test>\cygwin\bin\unzip \dx4w801\dx4win_regexp.zip
> Archive:  \dx4w801\dx4win_regexp.zip
>   inflating: pcre3.dll
>   inflating: regexp/freq1.txt
>   inflating: regexp/qth1.txt
>   inflating: Dx4win.exe
> 
> c:\test>ls -l
> total 3296
> -rw-r--r-- 1 reisert Domain Users 3229184 Aug 14 00:20 Dx4win.exe
> -rw-r--r-- 1 reisert Domain Users  140288 Mar 17  2007 pcre3.dll
> drwxr-xr-x 1 reisert Domain Users       0 Aug 14 10:57 regexp
> 
> 
> GNUWIN32:
> 
> c:\test>unzip \dx4w801\dx4win_regexp.zip
> Archive:  /dx4w801/dx4win_regexp.zip
>   inflating: pcre3.dll
>   inflating: regexp/freq1.txt
>   inflating: regexp/qth1.txt
>   inflating: Dx4win.exe
> 
> c:\test>ls -l
> total 3296
> -rwx------+ 1 reisert Domain Users 3229184 Aug 14 00:20 Dx4win.exe
> -rwx------+ 1 reisert Domain Users  140288 Mar 17  2007 pcre3.dll
> drwx------+ 1 reisert Domain Users       0 Aug 14 10:58 regexp

  So, which version of zip did you use to create the archive in the first
place?  It looks like what's going on here is that Gnuwin and Cygwin have
different notions on how to represent the permissions on a windows file in a
zip archive.  Gnuwin is storing the full windows ACL - note the '+' at the end
of the file perms when you unpack using that unzip.  Cygwin's zip presumably
stores and expects to find perms in the unix rwx format, and is maybe picking
some default perms when it doesn't find any unixy ones.  Potentially Cygwin's
zip could be extended to understand the windows ACL format and unpack it, but
for now I guess you need to make sure you pack and unpack with a matching pair
of zip/unzip, or accept that in the unixy cygwin world, a bunch of files from
a windows zip archive simply aren't going to come with unixy perms because
windows zip doesn't know about them.

    cheers,
      DaveK



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]