cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: My first post for verification

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Thu, 27 Aug 2015 20:15:12 +0200

 
Dan Fandrich wrote:
>> > CWD /
>> < 250-NAMEFMT set to 1.
>> < 250 "/" is current directory.
>> > CWD QTEMP
>> < 550-Specified directory does not exist or cannot be accessed.
>> < 550 Working directory not changed.
>>
>> * Server denied you to change to the given directory
>> * Connection #0 to host hs41 left intact Wed Aug 26 12:44:42 2015
>> Access denied to remote resource

Obviouly, this is an access to an AS/400 server. If Ken had set it in
subject, I would have read the thread before.

So let's speak specific:
- Curl works in NAMEFMT 1, which means you have to use an IFS pathname.
A QSYS source menber is named
/QSYS.LIB/YOURLIB.LIB/YOURFILE.FILE/YOURMBR.MBR using NAMEFMT 1. In
fact, curl even forces NAMEFMT 1 when the os name is "OS/400".
- It is not recommended to enter NAMEFMT 0 mode since this naming does
not match libcurl expectations.
- **** BEWARE ****: QTEMP is a virtual library that is created at
session start time and ends with it. Each concurrent job has a different
QTEMP. Therefore I'm pretty sure your upload, even if successful, will
disappear when the FTP session terminates :-( Furthermore, I don't think
QTEMP can be addressed as a NAMEFMT 1 path. You should target a real
library or an IFS stream file.

> I don't know what qtemp is, but your description of what it's doing
sounds like it may be breaking the RFCs w.r.t. directory handling. In
any case, setting the CURLOPT_FTP_FILEMETHOD to CURLFTPMETHOD_NOCWD will
probably fix this for you.

In any case, in NAMEFMT 0 mode, you can only access the QSYS file
system: with a cli FTP client, you issue "CD LIBRARY", then "PUT
FILE.MEMBER". No slashes. But again, prefer a real library and use an
IFS path as described above.

@Dan, now you know approximately what QTEMP is ;-)

Patrick

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-27