delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/13/09:33:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <425D1EF9.7090705@byu.net>
Date: Wed, 13 Apr 2005 07:30:33 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: Gobance Stephane <stephane DOT gobance AT siemens DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: cygwin coreutils-5.3.0-4 cp change read-only flag
References: <3454C59CCFC9D54F8270998E355E1FA05BB3E3 AT tlsm384a DOT ww011 DOT siemens DOT net>
In-Reply-To: <3454C59CCFC9D54F8270998E355E1FA05BB3E3@tlsm384a.ww011.siemens.net>
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Gobance Stephane on 4/13/2005 4:05 AM:
> Hi,
>  
> I have just installed the last coreutils package (at this day 5.3.0-4)
> and it seems that the "cp" command does not work in the same way as
> before (I do not remember the version I was using before).
> Actually, I try to copy a temporary JAR file (source), that I have just
> created with various Java API, to a library directory (destination). The
> source file has not the (Windows) read-only flag set but the destination
> has this flag set !
> I have tried to use the command "cp --preserve=all" but it does not work
> better.

I don't think the fault lies in cp, but in your file ownerships.  cp
- --preserve only preserves Unix file permissions, not the Windows read-only
flag; I think the reason the Windows read-only flag is being set or
cleared is based on the underlying behavior of cygwin itself based on
whether your user has permission to write the file.

>  
> -r-xr-xr-x  1 uidd0555       mkgroup-l-d  8008 Apr 13 11:59 dest.jar
> -rwxr-xr-x  1 uidd0555       mkgroup-l-d  8008 Apr 13 11:59 dest2.jar
> -r-xr-xr-x+ 1 uidd0555       mkgroup-l-d  8008 Apr 13 11:35 source.jar
> -rwxr-xr-x  1 Administrators ????????     8008 Apr 13 11:35 source2.jar

You probably want to run `mkgroup -l -d > /etc/group' to clean up this
listing.  Also, attaching the output of `cygcheck -svr' would be helpful.
 But notice that when you created source2.jar using Windows, it was
created with a different file owner, and that mapped to different POSIX
permissions.  Also, source.jar has permissions -r-xr-xr-x+; that trailing
+ means that there are ACLs associated with the file, so look at the
output of getfacl to see what further restrictions there are on copying
that file.  I'm not sure whether POSIX allows cp --preserve=all to
preserve ACLs.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCXR7584KuGfSFAYARApGgAKCNordya7Y/CSmrJ+bK2jMjU2UYLwCguC7I
g9Q1CIrCUsQ5pOJcWYj8t9g=
=PGmr
-----END PGP SIGNATURE-----

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

- Raw text -


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