× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The easiest way to track down a _new file_ that was PUT by FTP, is if auditing is active for *CREATE activity, and [ideally] having both a time period and user name to search on:
DSPJRN JRN(QAUDJRN) RCVRNG(*CURCHAIN)
FROMTIME('10/04/2007' 0800) TOTIME('10/04/2007' 1000)
JRNCDE((T)) ENTTYP(CO) JOB(*ALL) USRPRF(UserName)

A good way to [tell someone how to] specify where the file will go, is to change the current directory for the FTP server session. This tells FTP where the file should go, by default, on the PUT request. Thus if the file should go into /tmp, then the following two FTP subcommands have filename going to file '/tmp/filename':
cd /tmp
put filename

If auditing is not available, then from DSPUSRPRF UserName, determine the CURLIB() and HOMEDIR() for the user UserName. Combine that information with the following information, to review for which of the *LIB or *PATH should be the apparent /default folder/.

The /name format/ determines whether the default directory will be established in the root file system or the /QSYS.LIB file system. The naming rules plus the specification for current directory determine what could be called the /default folder/ to be used in the FTP server.
That is, either NAMEFMT(*PATH) or NAMEFMT(*LIB), and either CURDIR(*CURLIB) or CURDIR(*HOMEDIR). Both, per CHGFTPA:

? CHGFTPA ??NAMEFMT() ??CURDIR()
?-AUTOSTART() ?-TBLFTPIN()
?-NBRSVR() ?-LISTFMT()
?-INACTTIMO() ?-CRTCCSID()
?-CCSID() ?-SBSD()
?-TBLFTPOUT() ?-ALWSSL()

NAMEFMT() help:

*LIB
The LIBRARY/FILE.MEMBER naming format is used. This is
equivalent to specifying the SITE NAMEFMT 0 subcommand to
the FTP server.

*PATH
The path naming format is used for files. This setting is
equivalent to specifying the SITE NAMEFMT 1 subcommand to
the FTP server.

If default naming for the System i FTP server is the root file system versus /QSYS.LIB, then the following sequence of two FTP subcommands will reset the server to allow library/file.member naming if that is preferred:
cd /qsys.lib/qgpl.lib
quote site namefmt 0

As noted for the *PATH at the server, the NAMEFMT is automatically set to 1, and the PWD subcommand will show the current directory is under '/'. As in the following script [note: when the client is System i, as in the given, the pwd subcommand may appear redundant]:
>
331 Enter password.
230 USERNAME logged on.
i5/OS is the remote operating system...
250 Now using naming format "1".
257 "/" is current directory.
> pwd
257 "/" is current directory.
> namefmt 0
550 Current directory requires name format 1.
Server NAMEFMT is 1.
Client NAMEFMT is 0.
> cd /qsys.lib/qgpl.lib
250 "/QSYS.LIB/QGPL.LIB" is current library.
> namefmt 0
250 Now using naming format "0".
Server NAMEFMT is 0.
Client NAMEFMT is 0.

In the above script output, I am not sure why the user was sent to "/" instead of /home/UserName as was specified the *USRPRF; i.e. as was suggested would transpire, by the help for CURDIR(*HOMEDIR) [in that scripted test, was the specified value on CURDIR() for CHGFTPA], it seems that /home/UserName should have become the current directory established in that session.? Given the same result, looking for the file in the root directly may be appropriate.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.