cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: connecting to ftps with certificate?

From: Lukasz Szybalski <szybalski_at_gmail.com>
Date: Mon, 16 Jun 2008 13:45:07 -0500

On Mon, Jun 16, 2008 at 12:20 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Mon, Jun 16, 2008 at 11:23:48AM -0500, Lukasz Szybalski wrote:
>> Curl currently sends cwd #E2, and I think the servers needs "cd #E2"
>>
>> CWD #E2
>> < 550 Invalid directory.
>> * Server denied you to change to the given directory
>>
>> So is there a way for me to send "cd #E2" as some kind inline command
>> before upload starts?
>
> Are you *sure* the server needs "cd" instead of "CWD"? Most command-line
> ftp clients will translate a "cd" entered by the user into a "CWD" sent
> to the server. You can use the --quote command to actually send a "cd"
> (or whatever else you want) if you really need it , but if this command
> actually changes directories curl won't know about it and that could
> confuse it at a later point in the transaction.
>

so I finally figured that:

ftp> cd XXXX.YYYY/#E2
250 Currently to user XXXX.YYYY with class #E2
cd XXXX.YYYY/#E2/
550 Invalid directory.

so with quote I was able to do
curl -E certkey.pem -k -v -u user:pass
ftp://usa.ftptls.edisrvcs.com/xxx.yyy/ --ftp-ssl --quote "cwd /#E2" -T
testfile.txt

ok..

so now I just need to download files.

Would you have a quick bash script that parses list of files and then
downloads them?
Also, I have downloaded one of the files, but the content was not text
"@@!...." is there some kind of flag I have to set to maybe get files
as text or...?

Thanks,
Lucas
Received on 2008-06-16