This is the mail archive of the 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: ACLs getting reset after gunzip

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.


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.


Unsubscribe info:
Bug reporting:

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