| iMatix home page
| Xitami home page
| << | < | > | >>
Xitami Xitami
Version 2.2c

The FTP service

Overview

Xitami supports the FTP (file transfer) protocol. The FTP service was designed to be simple and easy to administer, while providing the security and speed necessary for a web site. You can administer the FTP service from the BBA screens, in the same way as you administer the rest of Xitami.

The current implementation of FTP does not support virtual hosts, so the FTP configuration applies to all virtual hosts defined for a web site.

The FTP service recognises these commands, and handles those not marked by '*':

 USER    PASV    STOU*   MAIL*   ALLO*   CWD     PWD     XMKD
 PASS    TYPE    SYST    MSND*   REST*   CDUP    RMD     XRMD
 ACCT*   STRU*   XSYS*   MSOM*   RNFR    XCWD    SITE*   XPWD
 REIN*   MODE*   PASV    MSAM*   RNTO    LIST    STAT*   XCUP*
 QUIT    RETR    APPE*   MRSQ*   ABOR    MKD     HELP    XEXC*
 PORT    STOR    MLFL*   MRCP*   DELE    NLST    NOOP

FTP Configuration Options

The configuration of the FTP service is handled by specific sections in the standard configuration file.

The [FTP] Section

This section controls the FTP service.

enabled
Specifies whether the FTP service is enabled or not. If you change this option you must stop and restart the server for it to take effect. (The BBA control panel 'Restart' action will not start the FTP service.)
Default: 1 (enabled).
root
Specifies the root directory for FTP logins, unless a specific directory is defined for the current user.
Default: ftproot (below main Xitami directory).
port
Specifies the FTP connection port. The port is shifted by the portbase specified for the main HTTP service. For instance if you specify a port 21, and a portbase of 8000, your server will accept FTP connections on port 8021 and HTTP connections on port 8080.
Default: 21 (the standard FTP port).
timeout
Specifies the time after which inactive control connections are closed. An FTP session requires one control connection, plus one data connection during file transfers. You should tune this timeout to suit the requirements of your system. For instance, under an OS like Windows 95, sockets are a limited resource, so a shorter timeout is a good idea. (Actually, a better idea is to download the winsock 2 upgrade, which gives you up to 32k sockets, instead of 256.) For sites with limited access, you can use high timeouts, which users generally prefer.
Default: 300 (5 minutes)
limit
Specifies the maximum number of users that may login at once. On systems that can handle lots of open sockets (e.g. Unix, OS/2, WinNT, Win98), you may want to increase this. Xitami does not impose any fixed limit. If you set this value to 0, it means 'no limit'.
Default: 15 users.
user-file
Specifies the name of the user definition file. The syntax for this is described below.
Default: ftpusers.aut.
directory-file
Specifies the name of the directory definition file. The syntax for this is described below.
Default: ftpdirs.aut.
welcome
Specifies a text to be shown when a user connects to the FTP server. This can be literal text, or the name of a file, preceded by '@'. The file can contain up to 2000 characters. Any lines that start with '#' are ignored as comments. If you modify this file, it is safest to make a copy (call it welcome.txt or something) and change this option to refer to the changed file. This avoids unpleasant surprises when you reinstall the next latest greatest version of Xitami.
Default: @ftphello.txt (an example file).
login-text
Specifies a text to be shown when a user logs-in to the FTP server. This can be literal text, or the name of a file, preceded by '@'. The file can contain up to 2000 characters. Any lines that start with '#' are ignored as comments. If you modify this file, it is safest to make a copy (call it login.txt or something) and change this option to refer to the changed file.
Default: @ftplogin.txt (an example file).
email-check
If 1, the FTP server will check that the e-mail address supplied for anonymous logins is a valid address. The nature of the check is not documented (it may just look for an '@' in the address).
Default: 0 (do not check addresses).
http-aliases
Specifies whether the HTTP [Alias] section should be used by the FTP service. This can be useful in configurations where you want to share the same data between services, but it can be a security risk if you want to use FTP aliases to access directories outside the HTTP space.
Default: 0 (disabled).
webmask
Specifies the set of clients that can connect to the FTP server. Works in the same way as the HTTP webmask option.
data-port
Specifies the port at which data connections will be made. Xitami scans for free ports, so this is simply the start of a range of ports. The port is shifted by whatever value was used for the server portbase.
Default: 200.
force-ip
Indicates whether passive connections must be forced to the IP address specified in the 'ipaddress' option.
Default: 0 (do not force).
ipaddress
The IP address used for passive connections.
Default: 127.0.0.1.

The [FTPLog] Section

This section controls the FTP access log.

enabled
Specifies whether FTP accesses are logged or not. FTP accesses are logged in a format similar to that used for HTTP accesses.
Default: 1 (accesses are logged).
filename
Specifies the filename for access logging. This may be the same as the main HTTP access log file.
Default: access.log.
Specifies the cycle mode for the log file. This option is being redesigned.
Default: daily.

The [FTP-Alias] Section

This section lets you define multiple FTP file roots. Each alias alias specifies a name and a path. For example:

[FTP-Alias]
volume-c=C:\

The alias name may not contain '/'. It is not case sensitive. FTP aliases are only shown to users who's root directory is "/", i.e. who work at the ftproot level. Like HTTP aliases, the FTP alias is always the first component of a filename (e.g. /volume-c/somefile).

The [FTPErrLog] Section

This section controls the FTP error log.

enabled
Specifies whether FTP errors are logged or not. FTP errors are logged in a format similar to that used for HTTP errors.
Default: 1 (errors are logged).
filename
Specifies the filename for error logging. This may be the same as the main HTTP error log file.
Default: error.log.
Specifies the cycle mode for the log file. This option is being redesigned.
Default: daily.

FTP User File Syntax

The FTP user file defines all users that may log-in to the FTP server. This is a typical user file:

[Admin]
    Access=*
    Password=-
    Root=""             #   Will have access to aliases
[Anonymous]
    Access=G
    Password=*
    Root=pub
[Guest]
    Access=G
    Root=c:\public\guest
[Upload]
    Access=P
    Password=upload
    Root=/tempfiles/upload

The user name is specified like this: [Admin]. User names are not case-sensitive. The password may be any text. The password may be one of these special values:

The access rights are any combination of:

The 'root' option defines where the user can work. If this is not specified, the user can work anywhere below the FTP root directory. You can also specify a full path, for instance:

root=/home/users/guest

FTP Directory File Syntax

The FTP directory file defines access rights per user for specific directories. Each section is a directory name; either an absolute directory (e.g. [/pub]) or a child of the ftproot directory (specified without a leading slash: [pub]). Under Windows, do not use '\' in directory names: all comparisons are done using the UNIX-style forward slash, '/'.

A directory entry covers all child directories, unless a more specific directory is defined for that user. Directory names are not case significant, and '-' and '_' are treated equally.

Each entry specifies access rights for a user; the user must have been defined in the FTP users file. The same access right codes are used.


| << | < | > | >>
| Welcome To Xitami | Table Of Contents | Installing Xitami | Administration | Configuration | Using CGI | Using SSI and Filters | Image Maps | Virtual Hosting | The FTP service | A Beginner's Guide | FAQ | Writing Web Server Extension (WSX) Agents | Extending Xitami with External Peer Processes | Technical Implementation | Getting Support | Release History | License Agreement
iMatix
Copyright © 1996-97 iMatix