delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/15/09:52:15

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_21,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A86C0AF.2090100@gmail.com>
Date: Sat, 15 Aug 2009 15:05:35 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: UNZIP: Why don't .exe/.dll files get eXecute privs?
References: <806a89db0908140943k3d5a9f41k559c45ec82fb8983 AT mail DOT gmail DOT com> <806a89db0908140959u479d0789wf6f74f8cb92bfd0d AT mail DOT gmail DOT com>
In-Reply-To: <806a89db0908140959u479d0789wf6f74f8cb92bfd0d@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019