FTP users then see a short message like this as part of the login text:
220 FTP server ready.
Also, not all FTP clients can handle multiline responses from the FTP server. The banner <path>
command is what the banner line uses to pass the file contents to the client. If clients cannot interrupt multiline responses, the FTP server is useless to them. You should also edit the default banner to remove identity and version information.
This line specifies a text file to be displayed to the user during login and when the user issues the cd
command:
message <path> {<when> {<class> ...}}
The optional when
clause can be LOGIN
or CWD=(dir)
, where dir
is the name of a directory that is current. The optional class
parameter enables messages to be shown to only a given class or classes of users.
Using messages is a good way to give information about where things are on your site as well as information that is system dependent, such as alternative sites, general policies regarding available data, server availability times, and so on.
You can use magic cookies to breathe life into your displayed messages. Magic cookies are symbolic constants that are replaced by system information. Table 20.1 lists the message
command's valid magic cookies and their representations.
TABLE 20.1 Magic Cookies and Their Descriptions
Cookie | Description |
---|---|
%T | Local time (form Thu Nov 15 17:12:42 1990 ) |
%F | Free space in partition of CWD (kilobytes) [Not supported on all systems] |
%C | Current working directory |
%E | Maintainer's email address as defined in ftpaccess |
%R | Remote hostname |
%L | Local hostname |
%u | Username as determined via RFC931 authentication |
%U | Username given at login time |
%M | Maximum allowed number of users in this class |
%N | Current number of users in this class |
%B | Absolute limit on disk blocks allocated |
%b | Preferred limit on disk blocks |
%Q | Current block count |
%I | Maximum number of allocated inodes (+1) |
%i | Preferred inode limit |
%q | Current number of allocated inodes |
%H | Time limit for excessive disk use |
%h | Time limit for excessive files |