scp: Problem when source and destination are identical

Markus Friedl Markus.Friedl at informatik.uni-erlangen.de
Fri May 25 20:13:42 EST 2001


On Fri, May 25, 2001 at 11:43:15AM +0200, Gert Doering wrote:
> Hi,
> 
> On Fri, May 25, 2001 at 11:39:21AM +0200, Markus Friedl wrote:
> > scp is not 'broken'.  your suggested change will break both scp and rcp.
> > 
> > this patch may fix this special use. however, it will break scp/rcp
> > into a directory when you can only write this particular file and
> > not the directory.  moreover, it will change the scp/rcp behaviour
> > if the partition is almost full. and so on.
> 
> Which is why everyone else agreed that a switch to change between "overwrite
> in place" and "do atomic replace" is a good idea.

no, this is why "do atomic replace" does not work.

"overwrite in place" works fine, even if the use cannot create a new
file because of the directory permissions.

"overwrite in place" works fine, even if the filesystem is almost full.

image copying a 100MB file with "do atomic replace" if you have 50MB of
free space.



More information about the openssh-unix-dev mailing list