cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: --ftp-create-dirs problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 9 Nov 2010 13:23:18 +0100 (CET)

On Tue, 9 Nov 2010, Karl Swallow wrote:

> curl 7.21.2 (x86_64-unknown-linux-gnu) libcurl/7.21.2 OpenSSL/0.9.8b
> zlib/1.2.3 libidn/0.6.5 libssh2/0.17

I'm not sure it matters, but you're using a very old libssh2 version.

> curl: (9) Upload failed: Permission denied (3/-31)

> Any ideas what might be going wrong or what (3/-31) means?

3 is LIBSSH2_FX_PERMISSION_DENIED which is the actual SFTP code that is sent
from the server in the response and -31 is the return code from libssh2 which
is named LIBSSH2_ERROR_SFTP_PROTOCOL.

So, the server rejects the command curl sends it.

> Could it be trying to create a root folder /test ? (I tried cd / followed by
> mkdir test and it works)

I don't know, it will take a little debugging to see what is sent in this case
compared to the login and do mkdir that you mentioned (I trust you truly use
SFTP when you do that manual mkdir that compare with and not plain SSH).

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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 2010-11-09