cURL / Mailing Lists / curl-users / Single Mail


Re: curl does not detect 'no space left on device' during scp

From: Priyanka Shah <>
Date: Fri, 18 Jul 2014 16:04:36 -0700

Thanks Daniel. Is there another way to find out whether the file was
completely transferred or not?
I tried using curl_easy_getinfo(), but looks like it returns bytes
transferred, not bytes written on remote server.

curl_easy_getinfo(client, CURLINFO_SIZE_UPLOAD, &sentBytes);

In my example, it returned 321434 for sentBytes, even when filesize on
remote server was zero.

Is there any other way I can detect transfer failed?

On Fri, Jul 18, 2014 at 1:58 PM, Daniel Stenberg <> wrote:

> On Wed, 16 Jul 2014, Priyanka Shah wrote:
> It looks like curl cannot detect 'no space left on device' when I try to
>> copy file using scp. It returns success, but the copied file size is zero
>> bytes.
> ...
> Is this is known bug with curl? Is there some way I can detect this
>> situation from my application code?
> I believe this happens because libssh2 that does the SCP transfer doesn't
> return an error for the transfer. I've seen that happen in the past for
> no-space-left-on-device when the server simply doesn't return an error for
> this case (SCP is a not a very good protocol for detailed error reporting).
> It may or may not be what happens for you here.
> --
> /
> -------------------------------------------------------------------
> List admin:
> FAQ:
> Etiquette:

List admin:
Received on 2014-07-19