Sample FTP Server Logon Exit Program (C Language)

The sample program that follows provides additional control over the process of

authenticating a user to a TCP/IP application server.

File Transfer Protocol
Previous FTP subcommands and messages:
Connecting to host sysnam01.city.company.com at address 9.130.42.106 using
21.
220-QTCP at sysnam01.city.company.com.
220 Connection will close if idle more than 5 minutes.
OS/400 is the remote operating system. The TCP/IP version is "V3R2M0"
> abc
331 Enter password.
530 Log on attempt by user ABC rejected.
> user xyz
331 Enter password.
230 XYZ logged on.
250 Now using naming format "0".
257 "XYZLIB" is current library.
> cd LIB101
250 Current library changed to LIB101.
> get FILEA.MEMBER1
550 Request rejected.
> put FILEC.MEMBER5
Operation not authorized.
Enter an FTP subcommand.
===> __________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
F3=Exit F6=Print F9=Retrieve
F17=Top F18=Bottom F21=CL command line

Figure 300. FTPClient Session Showing Restricted Logon and Restricted FTP Operations

AppendixE. TCP/IP Application Exit Points and Programs 555