ANDERSON RUSSELL D (ANDY)
2004-Apr-27 15:53 UTC
SCP misses copying a file on error (possible bug?)
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? Not copying a file without any error indication is a major problem. Here is the setup to replicate the problem: On hosta /tmp: -rwxrwxr-x 1 rdpecken rgr00rdp 12054 Apr 13 07:46 do_tie_configs -rwxrwxr-x 1 rdpecken rgr00rdp 9421 Apr 15 07:58 force_download -rwxrwxr-x 1 rdpecken rgr00rdp 9564 Apr 15 07:59 load_test_config -rwxrwxr-x 1 rdpecken rgr00rdp 7344 Apr 15 08:07 run_mgdiffs ****** -rwxrwxr-x 1 rdpecken rgr00rdp 5287 Nov 12 12:39 save_new_config ****** -rwxrwxr-x 1 rdpecken rgr00rdp 7580 Apr 15 08:54 save_new_tie ****** -rwxrwxr-x 1 rdpecken rgr00rdp 7600 Apr 15 08:02 save_tie_files -rwxrwxr-x 1 rdpecken rgr00rdp 1945 Feb 25 09:47 tie_build_setup_r10 -rwxrwxr-x 1 rdpecken rgr00rdp 7384 Apr 15 08:25 tie_dbgen_build -rwxrwxr-x 1 rdpecken rgr00rdp 7354 Apr 15 08:03 tie_setup On hostb /tmp: ****** -rwxrwxr-x 1 rgrmas rgrusr 5287 Apr 27 08:34 save_new_config ****** -rwxrwxr-x 1 bowtie rgrusr 7600 Apr 15 08:02 save_tie_files cd /tmp scp -p hosta:/tmp/[a-z]** . do_tie_configs 100% 12KB 11.8KB/s 00:00 force_download 100% 9421 9.2KB/s 00:00 load_test_config 100% 9564 9.3KB/s 00:00 run_mgdiffs 100% 7344 7.2KB/s 00:00 ****** save_new_config 100% 5287 5.2KB/s 00:00 ./save_new_config: set mode: Not owner ./save_new_config: set times: Not owner ****** save_tie_files 100% 7600 7.4KB/s 00:00 tie_build_setup_r10 100% 1945 1.9KB/s 00:00 tie_dbgen_build 100% 7384 7.2KB/s 00:00 tie_setup 100% 7354 7.2KB/s 00:00 The resulting files are: ****** -rwxrwxr-x 1 rgrmas rgrusr 5287 Apr 27 08:34 save_new_config ****** -rwxrwxr-x 1 bowtie rgrusr 7600 Apr 15 08:02 save_tie_files The question is why was the file "save_new_tie" not copied? It didn't even show up in the progress report above? It appears as if scp skips the following file after a previous file error. Thanks - Andy
guyverdh at mchsi.com
2004-Apr-29 14:57 UTC
SCP misses copying a file on error (possible bug?)
It would help if you could show the entire ls -l results after the copy. This would show us the userid used on the destination system, as well as date / time stamps on files. Also, a checksum to show that the file in question is different on both boxes, so that we can be certain that it did not get copied, since both files appear to have the same size and date/time shown. Thanks, Larry