This is the mail archive of the cygwin 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: cygwin coreutils-5.3.0-4 cp change read-only flag


-----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@byu.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/


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