Getting Started

Prerequisites

Since version 0.15 Hermes FTP Server requires Java 5 or later. Please check the java version installed on your system by typing the following command at the command prompt:
java -version
In case you have no java (or an outdated version) installed, you can get the latest version here . There are no further requirements for running the FTP server.

Installation

Unzip the file hermesftp-<version>.zip into a target folder of your choice. Change into this folder and open the file hermesftp-ctx.xml with a text editor. Find the entry "ftp.root.dir" and change the corresponding value into your ftp data folder (e.g. c:/ftproot). If this entry is omitted, Hermes FTP Server will create a data folder hermesftp in the user's home directory.

In case you want to enable SSL, you have to set up a keystore first. All other settings can remain as they are. The options bean configuration should look like following snippet.

<bean id="options"
         class="net.sf.hermesftp.common.FtpServerOptions"
         singleton="true">
	<property name="properties">
		<props>
			<prop key="ftp.root.dir">c:/ftproot</prop>
			<prop key="max.connections">20</prop>
			<prop key="buffer.size">2048</prop>
			<prop key="emulate.unix">true</prop>
			<prop key="ftp.port">21</prop>
			<prop key="ssl.force">false</prop>
			<prop key="ssl.allow.explicit">true</prop>
			<prop key="ssl.allow.implicit">true</prop>
			<prop key="ssl.port.implicit">990</prop>
			<prop key="ssl.keystore.file"></prop>
			<prop key="ssl.keystore.password"></prop>
			<prop key="ssl.cipher.suites"></prop>
			<prop key="charset.ebcdic">CP1047</prop>
			<prop key="charset.ascii">ISO-8859-1</prop>
		</props>
	</property>
</bean>
				

Running the server

Make sure you are still in the installation directory and issue the following command at the command prompt.
java -jar hermesftp.jar

How to avoid firewall issues

If you are running the ftp server behind a firewall, ftp clients will possibly experience problems transferring files, even though you opened the firewall for connections on port 21 (ftp) or 990 (ftp over ssl) respectively. This is because file data is transferred through a separate channel. The port of this data channel is defined by the ftp client (active transfer mode) or the ftp server (passive transfer mode). Most of the firewall issues can be solved by making the clients use the passive transfer mode.

Hermes FTP Server supports both transfer modes. Moreover, you are free to define the port list available for passive data transfer in the application context hermesftp-ctx.xml.

<bean id="options"
         class="net.sf.hermesftp.common.FtpServerOptions"
         singleton="true">
	<property name="properties">
		<props>
			...
			<prop key="allowed.passive.ports">
			    9000-9200,12000-12500
			</prop>
			...
		</props>
	</property>
</bean>
				

If you omit this property, Hermes FTP Server lets the underlying OS decide on which data port to use.