cURL / Mailing Lists / curl-users / Single Mail


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

From: Priyanka Shah <>
Date: Wed, 16 Jul 2014 12:52:17 -0700

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

$ curl --version
curl 7.36.0 (x86_64-unknown-linux-gnu) libcurl/7.36.0 OpenSSL/1.0.0
zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

I found a similar thread/bug report here, where curl was not detecting
ENOSPACE for small files.

I tried the same steps from there, and curl errors out now for that
experiment. But I don't see any errors when I use scp.

$ ls -trl testfile
-rw-r--r-- 1 prishah2 prishah2 345898 Jun 17 10:31 testfile

$ curl -T testfile -u prishah2 scp://localhost/space/ -k
Enter host password for user 'prishah2':
  % Total % Received % Xferd Average Speed Time Time Time
                                 Dload Upload Total Spent Left
  0 0 0 0 0 337k 0 71612 --:--:-- 0:00:04 --:--:--
  0 0 0 0 0 337k 0 71595 --:--:-- 0:00:04 --:--:--

$ echo $?

$ ls -trl /space/cores
-rw-r--r-- 1 prishah2 ifc 0 Jul 16 11:43 /space/testfile

Is this is known bug with curl? Is there some way I can detect this
situation from my application code?

List admin:
Received on 2014-07-18