type: ftpserver title: FtpServer Messages

Messages

This document explains how to customize all the Apache FtpServer reply messages.

All the server messages are customizable. The default reply messages are bundled with the server. The user defined custom messages will be stored separately. This custom message file is configurable.

The FtpServer project is interested in localized message bundles, please contact the project if you would like to donate.

Example

<messages languages="se, no ,da">

messages element

AttributeDescriptionRequiredDefault value
directoryThe directory in which message bundles can be locatedNo{{< html “ ” >}}
languagesA comma separated list of the languages that the server will provide messages inNo{{< html “ ” >}}

Creating a customized message bundle

Dynamic Values

Dynamic values can be embedded in the server message replies. User can specify different variables in message strings. Variables are represented by {variable} in the string.

Variable NameDescription
server.ipServer IP address.
server.portServer port.
client.ipClient IP address.
client.con.timeClient connection time. The date format is yyyy-MM-dd‘T’HH:mm:ss (ISO8601).
client.login.timeClient login time. The date format is yyyy-MM-dd‘T’HH:mm:ss (ISO8601).
client.login.nameUser login name. If the user has not passed the login name, it will be null.
client.access.timeClient last access time. The date format is yyyy-MM-ddTHH:mm:ss (ISO8601).
client.homeUser home directory.
client.dirUser current directory.
request.lineUser request line.
request.cmdUser FTP command.
request.argUser request argument. If there is no argument it will be null.
stat.start.timeServer start time. The date format is yyyy-MM-ddTHH:mm:ss (ISO8601).
stat.con.totalTotal number of connections after server startup.
stat.con.currCurrent connection number.
stat.login.totalTotal number of logins after server startup.
stat.login.currCurrent login number.
stat.login.anon.totalTotal number of anonymous logins after server startup.
stat.login.anon.currCurrent anonymous login number.
stat.file.upload.countTotal number of files uploaded.
stat.file.upload.bytesTotal number of bytes uploaded.
stat.file.download.countTotal number of files downloaded
stat.file.download.bytesTotal number of bytes downloaded
stat.file.delete.countTotal number of files deleted.
stat.dir.create.countTotal number of directories created.
stat.dir.delete.countTotal number of directories removed.
output.codeFTP Server 3 digit reply code.
output.msgBasic core message which has to be available in the message.