cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: The FTP problem that turns out to be SFTP

From: Michael Lam <Michael.Lam_at_silkroad.com>
Date: Mon, 9 Jan 2012 03:11:02 -0500

> whoops, I copied your's which was somehow truncated; should be:
curl -s -k -v -u mlam: --key C:\temp2\keys\id_rsa --pubkey
C:\temp2\keys\id_rsa.pub -T c:\temp2\test4.txt
sftp://sfcadevftp01/sftp_file_drop & @echo Errorlevel: %ERRORLEVEL%

I created a batch file and ran it, got this:

C:\temp2>runcurl.bat
C:\temp2>curl -S -k -v -u mlam: --key C:\temp2\keys\id_rsa --pubkey C:\temp2\keys\id_rsa.pub -T c:\temp2\test4.txt sftp://sfcadevftp01/sftp_file_drop --insecure
* About to connect() to sfcadevftp01 port 22 (#0)
* Trying 192.168.19.213... % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
* SSH authentication methods available: publickey,password,keyboard-interactive
* Using ssh public key file C:\temp2\keys\id_rsa.pub
* Using ssh private key file C:\temp2\keys\id_rsa
* Initialized SSH public key authentication
* Authentication complete
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Upload failed: Operation failed (4/-31)
  0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
* Connection #0 to host sfcadevftp01 left intact
curl: (79) Upload failed: Operation failed (4/-31)
* Closing connection #0
Errorlevel: 79

It didn't tell me much. Also, it's still a mystery to me what Operation failed (4/-31) means.

Also, although this is not directly related to the original "wrong error code on SFTP server" topic (I can start another thread), I just want to mentioned that the folder where I seemed to have no permission was created using CygWin shell on a Windows 2008 server. I am not sure if there are conflicts between folder permissions set by Windows and folder permissions set by the CygWin Unix Shell. I did a chmod 777 on that folder and ls -l shows that "others" have all the permissions. In Windows, others should correspond to the group Everyone, but if I go to the security tab for that folder, Everyone has no permission what so ever.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-09