VFS FTPServer Configuration

To use this bridge you should just add the VFS libraries, the VFS FTP Server library and, if needed, your custom VFS Provider and its dependencies to the common/lib directory of your Apache FTP Server installation.

This document will only explain how to use the property file based configuration of Apache FTP Server, but the XML based configuration is almost exactly the same.

As explained in the introduction there are two ways to use the VFS bridge; you can use VFS based authentication or not. The configuration needed for both ways are detailed below.

VFS based authentication

To have your VFS Provider handle authentication you should change the FTPServer user manager to the VFS user manager. You should set the root of the VFS, the type, the home directory of the user and optionally the domain to be used for authentication. The relation between the root of the VFS and the type is explained in Dctm VFS Provider configuration. Other FTP related settings such as the maximum logins per user, read-only access or throughput constraints can be configured too.

If the user name is specified within the VFS root this user name will replace the user name specified by the user in his credentials. The same yields for his password. Therefore normally you would not specify those in your VFS root.

Within the file system specified by the root you can set the path to the users home directory in which the user will start after connecting. The specification of the users home directory can contain the variable $user which will be replaced by the name of the user.

Since VFS supports the notion of domain, but this is not supported by FTP you can optionally specify the domain that should be used in the authentication (config.user-manager.authenticator.vfs-domain)

You can set which user should be regarded as the admin account with config.user-manager.admin-name. This account has special privileges such as the 'site who' and the 'site stat' commands. User management functions do not work however.

Opposite to the default User Managers of the FTP Server which allow different settings for each user, the VFS User Manager only makes an exception for the administrator role. Below the settings are described for the normal users, to change the settings for the admin account you should put admin between the setting and 'user-manager', e.g. config.user-manager.admin.write-permission. Note that the settings spanning all users are set in the connection manager.

Write permission can be configured using config.user-manager.write-permission; by setting this to false the users will have read-only access to the underlying file system (the default value is true).

The maximum number of simultaneous logins by the user can be set, as well as the maximum per IP (config.user-manager.max-login and config.user-manager.max-login-per-ip). The default values are 1 and 1, allowing only one connection per user account. When 0 is put, no restrictions are applied. Note that when you use Windows Explorer as FTP client, at least 2 connections are needed.

The connection does not expire by default, but this can be configured setting the maximum idle time in seconds (config.user-manager.max-idle-time), when 0 is put, the connection does not expire.

Upload and download rates can be limited by setting config.user-manager.upload-rate and config.user-manager.download-rate (in bytes). When 0 is put there are no restrictions.

Below you can see an example of a configuration.

 ## VFS user manager configuration.
 ## VFS based file system manager configuration.

This will project the directory d:/ftproot as the file system accessible via FTP and will start in home/user-a when user-a logs in.

To mount a ZIP file you could set




Standard user authentication

Another way of working with the VFS bridge is to let the Apache FTPServer do the authentication. In that case you can choose between LDAP, database or configuration file based user authentication.

You can specify the root to the VFS in the home directory of each user in your user administration. In this way each user can have a completely different mapping. In this case the configuration would look like this:

 ## VFS based file system manager configuration.

You can also specify the VFS root in the FileSystemManager and use the homedirectory in the user administration as a relative path within the root.

Here you have the same options as when using the VFS User Manager; you can specify root, type and domain.

An example configuration is this:

 ## VFS based file system manager configuration.