Patrick, Thank you very much for your reply. I was very interested in what you had to say about NAMEFMT 0 as that is the format our older FTP c++ client is using. The older code works with fine with QTEMP. I am able to upload a program into QTEMP, run it, and then download the results all in the same FTP session. It is ideal that it all goes away after the FTP session; this is good. But as you stated there seems to be some kind of issue when using NAMEFMT 0 with CURL. I get about half way through the upload and the transfer gets terminated due to an error * SSL_write() returned SYSCALL, errno = 10053 When I attempt the same transfer to IFS with a path/file it works fine. So it would seem this is a limitation or bug in CURL. I could spend time tracking it down and fixing it, or I could just move to using IFS instead. I think for now, I will get it working in the IFS.
Ken Alverson | +1 952-563-2795 www.helpsystems.com -----Original Message----- From: curl-library [mailto:[email protected]] On Behalf Of Patrick Monnerat Sent: Thursday, August 27, 2015 1:15 PM To: libcurl development Subject: RE: My first post for verification 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 Confidentiality Notice: This email, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this email is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this email is prohibited. If you have received this email in error, please notify the sender by replying to this message and delete this email immediately. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
