Configuring TFTP for clients

 

To allow clients to use the Trivial File Transfer Protocol (TFTP) server, ensure that the QTFTP profile has authority to access the directories and files that the clients access through the TFTP server. You also need to set the TFTP server attributes to allow the required client requests. When configuring TFTP for use by clients, first determine the directories and files that the clients are using. For this example, the clients use the TFTP server to read files from the directory /netpc/bin/system.

  1. Use the Create Directory (MKDIR) command with an argument of /netpc to create the directory /netpc.
    MKDIR (netpc)

  2. Specify the Work with Object Links (WRKLNK) command with an argument of /netpc.
    WRKLNK (netpc)

  3. Specify option 9 (Work with Authority) to display the current authorities.

  4. For the *PUBLIC user, specify option 2 (Change user authority), and specify *NONE for New data authorities.

    This ensures that the file is not open to the public.

  5. To add a user on the Work with Authority menu, specify the following on the first line: 1 for Opt, QTFTP for User, and *RX for Data Authority.

    Press Enter.

  6. Press F5 (Refresh) to refresh the menu. You see the user ID *PUBLIC with a data authority of *EXCLUDE, the user ID QTFTP with a data authority of *RX, and your own user ID with a data authority of *RWX.

    Use the MKDIR command to create the following directories:

    /netpc/bin /netpc/bin/system

    Each directory inherits the authority of the parent directory and has the owner added implicitly as a user with *RWX authority. Copy any files that the client requests to the netpc/bin/system subdirectory. You can copy the files in various ways, such as using the COPY command, File Transfer Protocol (FTP), or iSeries™ Access. You must ensure that the QTFTP profile has *R authority to each file that the client requests. To set the authorities for the files, use the WRKLNK command and option 9 (Work with Authority).

  7. Specify the Change TFTP Attributes (CHGTFTPA) command or press F4 (Change TFTP Attributes).

  8. Change the Alternate source directory to /netpc/bin/system and press Enter.

    This allows the TFTP server to request any file with the appropriate authority settings, including the directory /netpc/bin/system in its path.

  9. To have the changes take effect, stop the TFTP server with ENDTCPSVR *TFTP and restart it by using STRTCPSVR *TFTP.

 

Parent topic:

Trivial File Transfer Protocol