WaarpGatewayFtp Configuration

How to configure Waarp Gateway Ftp

In the zip distribution WaarpGatewayFtp-X.Y.Z-dist.zip (available at Github for download), you will find an extra directory named: src/main/config where two examples files are: config.xml and authent.xml. Those two files are related to the simple implementation of the Ftp Server.

The first one (config.xml) specifies the general behavior:

  • server names, ports, home directory and subdirectories, ssl key
  • server admin name and password (for administrator access and shutdown function)
  • server special configuration like threads number, timeout of connection, deleteOnAbort, usenio, fastmd5, blocksize, rangeport and the localization of the authentfile (second file)
  • server database configuration

The second one (authent.xml) is a simple authentication file containing user definition (user name, password, account, admin status).

Steps

  • Create keys for SSH and Passwords (see Config Waarp OpenSSL and WaarpPassword GUI project)
  • Create configurations files (server configuration file, authentication configuration file)
  • Create the database using the ServerInitDatabase
  • Make some tests using a standard FTP client

How to run Waarp Gateway Ftp

It can be started like:

java ... classpath and jvm settings ... org.waarp.gateway.ftp.exec.FtpServer src/main/config/config.xml

Note that in the classpath you need :

Some of them can be replaced if you change the implementation (Common IO is optional, Dom4J and Jaxen are only used if XML configuration file is used, SLF4J and Logback could be replaced with other logger framework, see the org.waarp.common.logging from WaarpCommon where JDK is also supported, others can easily be supported).

To shutdown the service, either you do a CTRL-C or better if Unix (but not IBM JDK)

  kill -SIGUSR1 <processID>

or even better you connect as an admin user and execute the special command:

  internalshutdown <password>

where the password is the one in the config.xml for admin actions.

For instance, using FTP Client from windows you have to type the command quote to pass a non standard command to the FTP Server.

  >quote internalshutdown <password>

Note that this FTP Server can be used as a simple one, but also for more complicated cases. It is in the middle of a self FTP server (simpleimpl package) and a framework to implement its own FTP service, which is the main reason of this project since I've not found any other open source implementations allowing to have pre or post actions on transfers or commands.

Hope this helps a bit... If you have any questions, remarks, just ask!