How Does OS/400 FTP Determine Working Directories?
June 7, 2002 Timothy Prickett Morgan
How does OS/400 determine what the default current working directory or library (CD) is when a remote client starts an FTP session using an AS/400 or iSeries as a host FTP server? How can I change that default?
OS/400 sets the current working directory through universal properties that tell FTP where to retrieve this information from for any signed-on user starting an FTP session. These setting are maintained in two places: through the green-screen Change FTP Attributes (CHGFTPA) command and in the iSeries Operations Navigator (OpsNav) program that comes with Client Access Express for Windows and the earlier Client Access for Windows 95/NT software.
The OS/400 FTP server contains two properties for determining how it assigns the current directory for signed-on clients: Initial Name Format (also called File naming format) and Initial Directory (also called Working directory). Initial Name Format determines the initial setting of the FTP File Naming Format (NAMEFMT) sub-command for each new FTP session. The choices here are *LIB (library/file.member format, which is the equivalent of issuing a SITE NAMEFMT 0 FTP sub-command to your host OS/400 FTP server from a signed-on client) or *PATH (the equivalent of issuing a SITE NAMEFMT 1 FTP sub-command from your client). When *LIB is selected, FTP transfers only take place between a native OS/400 library, a file/member name (where OS/400 FTP assumes the library and file member reside in the QSYS.LIB file system), and the target directory on the client’s machine. When *PATH is selected, FTP transfers can take place between a client and any location inside the iSeries Integrated File System (IFS), which also includes native OS/400 libraries and file/member names in QSYS.LIB. It’s also worth understanding that OS/400 FTP may automatically switch a session to use the *PATH format–NAMEFMT 1–when you designate a non-QSYS.LIB location for your current working directory.
To determine the current directory for any new FTP session, OS/400 FTP uses the Initial Name Format property in conjunction with the Initial Directory property to retrieve and set the FTP client’s current directory on the OS/400 server. When the Initial Directory property is set to *CURLIB, FTP uses the Current Library parameter (CURLIB) in the OS/400 user profile that started the FTP session as its default current working directory. *CURLIB can be specified when the Initial Name Format property is equal to either *LIB or *PATH. When the Initial Directory property is set to *HOMEDIR, OS/400 FTP uses the signed-on user profile’s Home Directory parameter–HOMEDIR, which is always listed as an iSeries Integrated File System location–for the session’s current working directory. It’s important to note that when Initial Directory is set to *HOMEDIR, *PATH must be specified for the Initial Name Format property.
OS/400 FTP retrieves either the signed-on user profile’s Current Library or his Home Directory for the session’s current directory, depending on how your FTP properties are set. If *CURLIB is selected for the Initial Directory and the signed-on user profile has no Current Library parameter entered (as specified by a user profile CURLIB value of *CRTDFT), OS/400 FTP will automatically use library QGPL as the current working directory. If *HOMELIB is selected and the signed-on user profile has no Home Directory parameter specified, FTP will automatically specify the root (/) directory in the iSeries IFS as the default working directory.
To determine what the default working directory will be for a particular user’s client FTP session, you need to review these FTP property settings as well as the initiating user profile’s CURLIB or HOMEDIR parameter settings. Just remember that these are universal settings that are applied to all user profiles starting an FTP session with your iSeries or AS/400 host. You can’t have some users using the *CURLIB method while other use *PATH. It has to be a universal approach.
To reset or view your FTP properties from the green-screen, enter the CHGFTPA command, press F4, and work with the Initial Name Format (NAMEFMT) and Initial Directory (CURDIR) parameters. From iSeries Operations Navigator, open the Network-Servers-TCP/IP node and right-click on the FTP entry in the returned list of TCP/IP servers. From the pop-up menu that appears, select Properties, and you’ll find these FTP server parameters listed under the Initial Formats tab on the FTP Properties screen (and just to confuse things, IBM named these properties File naming format and Working directory on this screen). You can use either CHGFTPA or OpsNav to adjust these properties; a change made using one tool will automatically show up in the other.
On June 30, 2002,
On Monday, July 1st,
How can this happen? By CASS certifying your mailing names
Visit our Web site – www.worksright.com –