File systems and naming conventions

The File Transfer Protocol (FTP) server arranges the information units of a file system in a multiple-level tree-like structure.

The IBM® i file systems that you can use with FTP vary depending on the release level of the operating system. File systems on the IBM i operating system can use different terms for data and the hierarchical grouping of data.

Naming conventions

Each IBM i file system has its own set of rules for naming files. The format you use to name any file must adhere to the naming conventions of the file system in which it resides. Formats and examples of file names for IBM i file systems that are FTP enabled are described in the Integrated file system topic collection. The system can provide naming information for files on any operating systems when you use the QUOTE HELP subcommand.

FTP server NAMEFMT

When an FTP server session is started, NAMEFMT is set to a value of 0. You can change the NAMEFMT value by using the SITE subcommand.

The FTP server automatically switches from the default of NAMEFMT 0 to NAMEFMT 1 when the 'first' file or pathname parameter received in a subcommand either:

  • Starts with a slash (/) or a tilde (~) character

or

  • Is blank (except for the LIST and NLST subcommands)

Any subsequent server subcommands with a file or path name parameter will not affect the NAMEFMT value. In addition to changing the NAMEFMT, the FTP server reply for the subcommand will include a statement saying that the NAMEFMT value has been changed.

For example, the FTP server NAMEFMT value will be changed to "1" if the first server subcommand with a file or path name is:

     CWD  /DIR1/DIR2A

The FTP server reply will be:

     250-NAMEFMT set to 1. 
     250 Current directory changed to /DIR1/DIR2A.
Note: This capability enables the typical Web browser, which requires NAMEFMT 1, to interact with IBM i FTP servers without issuing a SITE NAMEFMT 1 subcommand.