cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl -T

From: kalin m <kalin_at_el.net>
Date: Tue, 01 May 2012 14:31:51 -0400

hi jim... my reply below...

On 5/1/12 9:52 AM, Young,Jim wrote:
> On 4/30/12 10:20 PM, bruce wrote:
>> kalin
>> on the site you're having issues, have you been able to use curl in the past??
>
> this is the first time working with this client. never had issues with previous sftp sites.
>
> error 79 is not included in the man page so not sure what am i looking at with "Operation failed".
>>
>> On Mon, Apr 30, 2012 at 9:03 PM, kalin m <kalin_at_el.net> wrote:
>>>
>>> # curl -vvvv -T some_file user:pass sftp://ftp.server.com/dir/
>>>
>>> * About to connect() to ftp.server.com port 22 (#0)
>>> * Trying 1.2.3.4... connected
>>> * Connected to ftp.server.com (1.2.3.4) port 22 (#0)
>>> * SSH authentication methods available: publickey,password
>>> * Using ssh public key file /user/.ssh/id_dsa.pub
>>> * Using ssh private key file /user/.ssh/id_dsa
>>> * Initialized password authentication
>>> * Authentication complete
>>> * Could not open remote file for writing: Operation failed
>>> % Total % Received % Xferd Average Speed Time Time Time
>>> Current
>>> Dload Upload Total Spent Left
>>> Speed
>>> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
>>> 0* Closing connection #0
>>>
>>> curl: (79) Could not open remote file for writing: Operation failed
>>> _____________________________________________________________________
>>>
>>> the thing is i can manually login and deposit the file by doing just:
>>> # sftp user:pass_at_ftp.server.com ...
>>>
>>> it can't be permissions since i get in with the same user manually.
>>> right? the remote system is a windows one (not sure if that has any
>>> importance). i talked to one of their admins (he said he has never
>>> heard of curl ?!?) and he can see me when i login manually but there
>>> is no log or any indication that curl is (successfully ?!) connecting
>>> as the -vvvv states.
>>>
>>> i've gotten the error "permission denied" before (when the thing was
>>> really permissions - played with my sftp machines) but "Operation
>>> failed" doesn't point to anything in particular.
>>>
>
> Error 79 in my curl man page says "An unspecified error occurred during the SSH session" which seems to fit with the -v output lines.

you must have a newer version.

> The Windows sftp servers that I've used curl with do some really odd things. Odd at least to someone from a Unix background. Ipswitch's MoveIT server is the oddest. Do you know what sftp server software they're using?

no. didn't tell me. i heard wsftp. but i know that as a client not a server.

> Does "some_file" exist in that directory on the sftp server?

no.

> If so, do you have permission to overwrite it?

i do. and i have permissions to delete.

> Have you tried other file names e.g. "somefile" without any special characters.

no special characters. it's like date.zip

> I'm assuming you're using the same login:passwd for both curl and plain sftp and uploading the same file to the same directory with the same file name.

that's righ.

> Jim Young
>
> ----------------------------------------------------------------------
> CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
>
> -------------------------------------------------------------------
> 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
-------------------------------------------------------------------
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 2012-05-01