Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 23 Feb 2003 21:50:36 -0500
From: "Pierre A. Humblet" <pierre.humblet@ieee.org>
To: cygwin@cygwin.com
Subject: Re: ACLs getting reset after gunzip
Message-ID: <20030224025036.GA34736303@hpn5170x>
Mail-Followup-To: "Pierre A. Humblet" <pierre.humblet@ieee.org>,
	cygwin@cygwin.com
References: <618AE5310A50754A8478629F7A5EB1377AD78C@ngaio.levlin.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <618AE5310A50754A8478629F7A5EB1377AD78C@ngaio.levlin.com>
User-Agent: Mutt/1.4i

On Sun, Feb 23, 2003 at 05:59:30PM -0800, Jonathan Levine wrote:
 
> I'm having a problem with cygwin's g(un)zip.exe and NTFS ACLs.

Jonathan,

Cygwin attempts to emulate Posix. Thus when it creates a file
it also creates an ACL with the permissions for the owner, group
and other (everyone). 
It does not pay attention to the inheritance of the directory,
and it sets a bit in the file acl to prevent inheritance 
propagation, which is the Window default.
In addition, if you are in the Administrators group, Cygwin
will not set Administrators as the file owner (Windows default), 
but yourself.

You could use getfacl, chown and setfacl to copy the acl,
as follows (untested; make it a bat file)

getfacl myfile > savedacl
gzip myfile
chown Admininistrators myfile.gz  <== if you are in Administrators
setfacl -f savedacl myfile.gz 

Even that won't be perfect. Everyone will still be in the final
acl but with few access rights.

Pierre


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

