[Bug 794] scp2 copy from machine A (openssh 3.5p1) to B (ssh 2.4.0) causes transferred file to be empty
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Sat Jan 24 10:14:11 EST 2004
http://bugzilla.mindrot.org/show_bug.cgi?id=794
------- Additional Comments From dtucker at zip.com.au 2004-01-23 16:14 -------
(Ben beat me to the update, but I thought I'd add my 2 cents anyway).
Although it's nasty it's doing exactly what you told it to. The steps scp will
take are (in approximate order):
1) open source file for read
2) connect to target system
3) truncate destination file
4) send source file
5) write destination file
Because your source and destination are the same, it goes pear-shaped at point 3.
I'm not sure what scp could do about it. If it used a temp file or unlinked the
destination first, because scp is unprivileged there's no guarantee that file
permissions, ownership or non-traditional filesystem metadata (like ACLs), could
be restored (currently they'll remain unchanged).
Perhaps the only advice I can offer is "don't do that" (or possibly "use rsync
for that" since it will use temp files).
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-bugs
mailing list