RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $");
Part of the OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
distribution
Could someone verify this case we found that causes a file to be missed during
copying?
Here is the setup to replicate the problem:
On hosta /tmp:
-rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file0
-rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file1
-rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file2
On hostb /tmp:
-rw-rw-r-- 1 user02 group02 0 Apr 13 10:44 file0
cd /tmp
scp -p hosta:/tmp/file* .
file0 100% 0 0.0KB/s 00:00
./file0: set mode: Not owner
./file0: set times: Not owner
file2 100% 0 0.0KB/s 00:00
The resulting files are:
-rwxrwxr-x 1 user02 group02 0 Apr 13 13:30 file0
-rw-rw-r-- 1 user01 group02 0 Apr 13 10:44 file2
The question is why was "file01" not copied?
Thanks - Andy
On Tue, 13 Apr 2004, ANDERSON RUSSELL D (ANDY) wrote:> RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $"); > Part of the OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003 distribution > > Could someone verify this case we found that causes a file to be missed during copying? > > Here is the setup to replicate the problem: > > On hosta /tmp: > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file0 > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file1 > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file2 > > On hostb /tmp: > -rw-rw-r-- 1 user02 group02 0 Apr 13 10:44 file0 > > cd /tmp > scp -p hosta:/tmp/file* . >Before scp sees it the arguments are expanded by your shell to: scp -p hosta:/tmp/file0 . Thus it will not copy anything else. scp -p 'hosta:/tmp/file*' . may be more useful in this case for you. - Ben
I don't believe that to be true as file2 was copied per the message. -----Original Message----- From: Ben Lindstrom [mailto:mouring at etoh.eviladmin.org] Sent: Tuesday, April 13, 2004 2:19 PM To: ANDERSON RUSSELL D (ANDY) Cc: openssh-unix-dev at mindrot.org Subject: Re: scp problem On Tue, 13 Apr 2004, ANDERSON RUSSELL D (ANDY) wrote:> RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $"); > Part of the OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003 distribution > > Could someone verify this case we found that causes a file to be missed during copying? > > Here is the setup to replicate the problem: > > On hosta /tmp: > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file0 > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file1 > -rw-rw-r-- 1 user01 group01 0 Apr 13 10:44 file2 > > On hostb /tmp: > -rw-rw-r-- 1 user02 group02 0 Apr 13 10:44 file0 > > cd /tmp > scp -p hosta:/tmp/file* . >Before scp sees it the arguments are expanded by your shell to: scp -p hosta:/tmp/file0 . Thus it will not copy anything else. scp -p 'hosta:/tmp/file*' . may be more useful in this case for you. - Ben
HI,
I am facing some problem in SCP , when giving the scp at the source
(where the source file is located), and both the source and destination are
running sshd in linux. Its not copying the file to destination at all,
rather it copies to itself. Any solution for this?
Thanks in advance
Regards
Prasad nn