[OpenIndiana-discuss] Cygwin "cp" from Windows client does not preserve permissions

Andrew Martin amartin at xes-inc.com
Wed Jun 24 17:01:49 UTC 2015


----- Original Message -----
> From: "Bob Friesenhahn" <bfriesen at simple.dallas.tx.us>
> To: "Discussion list for OpenIndiana" <openindiana-discuss at openindiana.org>
> Sent: Tuesday, June 23, 2015 6:06:47 PM
> Subject: Re: [OpenIndiana-discuss] Cygwin "cp" from Windows client does not preserve permissions
> 
> On Tue, 23 Jun 2015, Andrew Martin wrote:
> >
> >> From a Windows 7 client, if I use cygwin's version of cp to copy these
> >> files
> > into a subdirectory, the permissions change:
> > mkdir subdir1
> > cp file*.txt subdir1
> 
> Without considering any of the other Windows/ACL-specific details, it
> is worth pointing out that 'cp' does not preserve permissions by
> default (including on pure Unix).  It is necessary to use 'cp -p' to
> preserve permisions (mode, ownership, timestamps).  There are likely
> GNU/Cygwin extensions to deal with ACLs.
> 
Hi Bob,

I wasn't able to find any documentation on Cygwin extensions to deal
with ACLs - did you have a particular utility in mind for this? 

I would expect that the normal behavior of cp would be as you said that
it would not preserve permissions, and thus the new files in this 
subdirectory would be assigned the inherited ACLs - correct? This didn't
occur when using Cygwin's "cp", so it seems that some additional action
is occurring which either overrides or occurs after the inherited ACLs
are set.

Thanks,

Andrew



More information about the openindiana-discuss mailing list