cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: peforming ftp site commands within curl

From: Jim Young <j4young_at_gmail.com>
Date: Wed, 24 Feb 2016 17:02:58 -0600

On 2/24/2016 11:19 AM, Leif W wrote:
> On 2016-02-24 11:29, Perrin, Brandon S wrote:
>> Can someone tell me if possible where I can find some guidance on how to
>> execute some ftp site commands prior to uploading a file to a MVS ftp
>> server.
>>
>> i.e. in ftp we have commands like this :
>>
>> site recfm=fb lrecl=80 blksize=0
>>
>> site tracks primary=125
>>
>> is there a way to perform these in curl ?
>
> I Googled "curl specify custom ftp commands", found the curl FAQ [1],
> which mentioned the -Q, --quote <command> option [2], which accepts a
> few curl-specific and RFC 959 [3] defined commands, of which "site"
> seems to be mentioned.
I have used -Q to send SITE commands to a server (though I don't have
any experience with your MVS server.) It did work for me. I would
suggest that you do two things:

1) Verify that the SITE commands you are sending work as expected. I did
this by entering the commands manually in an ftp client program with the
verbose option turned on. One thing I discovered doing that was that
the server would respond only to upper case "SITE" but not "site" commands.
2) When you try your commands with curl, again put the verbose mode on
to see if the server gives any clue as to whether it accepted the
command or not.

Once you've done this, if it still doesn't work, you could try reposting
the question with additional information. Include information about
both the client and sever (OS, version etc.), what version of curl
you're using and the output from the attempt with verbose mode on.

Good luck

Jim Young
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-02-25