X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=V+bZ+pwBXdfixvocsp875Kdc/rkOFs3iheNhUHGYj5H
	hV6UY23+NRsY2J5r2vsaAUNQW+n9amcUNHKICDTk/cWEamvXtJpe5py7y6aoRYlt
	qluu6u/KWDeIFbHef6K7T44m9fBe1RYqu+CjAqOT4wjdfNpD5b8MPIuQFGc9kueY
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=wc5jKL7tyPTV+f7+gmMALM4Hf00=; b=NRHeQsBrUbzVb8vCZ
	z18XgliezuL38HnkTWJTY0cgn+NFZwhMhsv9kH7CxJ54cpeWodJbV4WRAX5U9431
	FVklbzpSb+GQN675TPwqglcul8ntCN7/Hy3b0Ljr9yxM/uBBc4gCQWxb0CZoH9fj
	BY/sK0Iz7XQEYARtjI4M//UfIk=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_05,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,TW_MV,TW_RW,TW_WX,TW_XR autolearn=ham version=3.3.1
Message-ID: <51633042.3090709@cwilson.fastmail.fm>
Date: Mon, 08 Apr 2013 17:01:54 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cp "skipping file ..., as it was replaced while being copied
References: <CAP_ScW1ARAqsKF8yADP4ZRzkF1COCo9GRWjX=-kFrwOsM-aCmQ@mail.gmail.com> <1846269758.20130329193140@mtu-net.ru> <CAP_ScW1LoTkB7KobeM+xufvhP7tazUPh9evK-0WMCXR9_DhPKg@mail.gmail.com> <5155FB50.1090709@cygwin.com>
In-Reply-To: <5155FB50.1090709@cygwin.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 3/29/2013 4:36 PM, Larry Hall (Cygwin) wrote:
> On 3/29/2013 4:25 PM, Bill Priest wrote:
>> #3 I saw lots of complaints and responses for requests for drive info;
>> but I never saw an explanation of why this checking is being done.
>
> I haven't looked at the code like you have but I believe this is to
> avoid the case of the file being copied onto itself.
>

FWIW, I am also seeing this problem, on a remote share (not "ftp") 
mounted to a drive letter, or via its UNC path.  I've worked around the 
issue by using rsync to copy the file, rather than cp (rcp and scp also 
fail).  I'm not sure what rsync does differently, but it works.

user@machine /k/path $ cp bob fred
cp: skipping file `bob', as it was replaced while being copied

user@machine /k/path $ scp bob fred
cp: skipping file `bob', as it was replaced while being copied

user@machine /k/path $ rcp bob fred
/bin/cp: skipping file `bob', as it was replaced while being copied

user@machine /k/path $ rsync bob fred

user@machine /k/path $ ls -l bob
-rwxrwxr-x+ 1 user group 13K Apr  8 16:57 bob*

user@machine /k/path $ getfacl bob
# file: bob
# owner: user
# group: group
user::rwx
group::rwx
group:root:rwx
group:SYSTEM:rwx
mask:rwx
other:r-x

user@machine /k/path $ /usr/lib/csih/getVolInfo.exe /k
Device Type        : 7
Characteristics    : 10
Volume Name        : <programs10>
Serial Number      : 2684354574
Max Filenamelength : 255
Filesystemname     : <NTFS>
Flags              : 4004e
   FILE_CASE_SENSITIVE_SEARCH  : FALSE
   FILE_CASE_PRESERVED_NAMES   : TRUE
   FILE_UNICODE_ON_DISK        : TRUE
   FILE_PERSISTENT_ACLS        : TRUE
   FILE_FILE_COMPRESSION       : FALSE
   FILE_VOLUME_QUOTAS          : FALSE
   FILE_SUPPORTS_SPARSE_FILES  : TRUE
   FILE_SUPPORTS_REPARSE_POINTS: FALSE
   FILE_SUPPORTS_REMOTE_STORAGE: FALSE
   FILE_VOLUME_IS_COMPRESSED   : FALSE
   FILE_SUPPORTS_OBJECT_IDS    : FALSE
   FILE_SUPPORTS_ENCRYPTION    : FALSE
   FILE_NAMED_STREAMS          : TRUE
   FILE_READ_ONLY_VOLUME       : FALSE
   FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
   FILE_SUPPORTS_TRANSACTIONS  : FALSE

user@machine /k/path $ mount -m
C: /c ntfs binary,posix=0 0 0
F: /f netapp binary,posix=0 0 0
H: /h netapp binary,posix=0,user 0 0
K: /k cifs binary,exec,posix=0,user 0 0
M: /m mvfs binary,posix=0 0 0
S: /s ntfs binary,posix=0 0 0
X: /x smbfs binary,posix=0,user 0 0
none /cygdrive cygdrive binary,posix=0,user 0 0

--
Chuck


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

