cURL / Mailing Lists / curl-users / Single Mail

curl-users

Sending file over SFTP can overwrite existing files

From: balsamik1 <balsamik1_at_gazeta.pl>
Date: Thu, 13 Jan 2011 19:04:44 -0500

Hi,

I have just discovered that sending files over SFTP with curl can overwrite
existing files on the remote server without any warning.
When I use the following command several times:

curl -T ./localfile -u user:pass sftp://host.domain.com/~/remotefile

it will work each time simply overwriting the remote file regardless what file I
use as the local file.

I use curl version: curl 7.20.0 (i686-pc-linux-gnu) libcurl/7.20.0 OpenSSL/1.0.0
zlib/1.2.1.2 libidn/0.5.6 libssh2/1.2.4

Is there any way to prevent the accidental overwrite from happening?

Thanks,

Tomasz

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-14