curl-users
--ftp-create-dirs problem
Date: Tue, 9 Nov 2010 11:43:07 -0000
Hi, I can't get --ftp-create-dirs working with sftp when connecting to a
"WeOnlyDo" sftp server.
This is the version I'm using, complied on the box -
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
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 SSL libz
This is the command line I'm using with details changed -
curl -v --ftp-create-dirs -u USERXX:PASSXX -T file.txt sftp://1.2.3.4/test/
If the folder "test" is created by logging in using sftp with the same
login, then the upload works but if the folder isn't there then instead of
creating it I get this -
* About to connect() to 1.2.3.4 port 22 (#0)
* Trying 1.2.3.4... % Total % Received % Xferd Average Speed Time
Time Time Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0connected
* Connected to 1.2.3.4 (1.2.3.4) port 22 (#0)
0 0 0 0 0 0 0 0 --:--:-- 0:00:18 --:--:--
0* SSH authentication methods available: password,publickey
* Using ssh public key file /home/stsadm/.ssh/id_dsa.pub
* Using ssh private key file /home/stsadm/.ssh/id_dsa
* SSH public key authentication failed: Unable to open public key file
* Initialized password authentication
* Authentication complete
0 0 0 0 0 0 0 0 --:--:-- 0:00:24 --:--:--
0* Upload failed: Permission denied (3/-31)
0 0 0 0 0 0 0 0 --:--:-- 0:00:24 --:--:--
0* Connection #0 to host 1.2.3.4 left intact
curl: (9) Upload failed: Permission denied (3/-31)
* Closing connection #0
Any ideas what might be going wrong or what (3/-31) means? Could it be
trying to create a root folder /test ? (I tried cd / followed by mkdir test
and it works)
Thanks
-------------------------------------------------------------------
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