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]

cygwin coreutils-5.3.0-4 cp change read-only flag

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
I have also noticed something very strange:
1) I made a copy of the source file (call it source.jar) with a
different name (call it source2.jar) in the source directory with
Windows Explorer.
2) I have launched the command "cp source2.jar dest2.jar" from cygwin
console and now it works ! The file dest2.jar has not its read-only flag
set !
First of all, I have thought for a while that my source JAR had specific
file permissions (for another user for instance) and that when I used
Windows Explorer, the file copied had new file permissions (for my own
user). Then, it could have explained why the cp command has worked in
this way and modified the read-only flag... Here is the directory
listing after launching the commands:
-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

uidd0555 is my own user login.

Any idea ??? I have never changed or managed the user/group DB so I do
not understand why it does not work anymore...
What is also surprising is why the file copied with Windows Explorer
(source2.jar) has now a new owner and group...



Unsubscribe info:
Problem reports:

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