Gateway: Installing a fresh copy

From CFTP

Jump to: navigation, search
  1. Download the latest version of the plug-in.
  2. Unzip the downloaded file gateway-x.xx-bin.zip into a temporary directory of your choice.
  3. Copy all the unzipped JAR files into the lib directory of your FTP server overwriting existing files. Manually remove old versions of duplicate JAR files.
  4. Copy all the unzipped XML files into the conf directory of your FTP server.
  5. Run the update script in your FTP server directory to update the start-up scripts.


Next you have to update the conf/beans.xml file in your FTP server. Edit the file in you favourite editor and do the steps below.


Please select which sign in module to use. You can only use one of the modules described below – 1 or 2 or 3 or 4 (and plain XML is the simplest one).


Contents

Plain XML module

Add the following bean to the bottom of your beans.xml file:

<bean id="xmlUserDAO"  
  class="com.coldcore.coloradoftp.plugin.gateway.dao.xml.XmlUserDAO">
  <constructor-arg index="0" value="conf/xml-users.xml"/>
</bean>

Locate the passCommand bean and replace it with the following:

<bean id="passCommand"  
  class="com.coldcore.coloradoftp.plugin.gateway.command.PassCommand"
  singleton="false">
  <property name="userDAO" ref="xmlUserDAO"/>
</bean>


Spring XML module

This module has been deprecated due to its poor design

Add the following bean to the bottom of your beans.xml file:

<bean id="springUserDAO"
  class="com.coldcore.coloradoftp.plugin.gateway.dao.spring.SpringUserDAO">
  <constructor-arg index="0" value="conf/spring-users.xml"/>
</bean>

Locate the passCommand bean and replace it with the following:

<bean id="passCommand"  
  class="com.coldcore.coloradoftp.plugin.gateway.command.PassCommand"
  singleton="false">
  <property name="userDAO" ref="springUserDAO"/>
</bean>


Database module

Add the following bean to the bottom of your beans.xml file:

<bean id="databaseUserDAO"
  class="com.coldcore.coloradoftp.plugin.gateway.dao.database.DatabaseUserDAO">
  <constructor-arg index="0" ref="usersDataSource"/>
</bean>

You must also add the usersDataSource bean pointing to your database. If you not sure how to describe a data source, look for examples in the internet.

Locate the passCommand bean and replace it with the following:

<bean id="passCommand"  
  class="com.coldcore.coloradoftp.plugin.gateway.command.PassCommand"
  singleton="false">
  <property name="userDAO" ref="databaseUserDAO"/>
</bean>


Acegi module

Add the following bean to the bottom of your beans.xml file:

<bean id="acegiUserDAO"
  class="com.coldcore.coloradoftp.plugin.gateway.dao.acegi.ExternalAcegiUserDAO">
  <constructor-arg index="0" value="conf/acegi-conf.xml"/>
</bean>

Locate the passCommand bean and replace it with the following:

<bean id="passCommand"  
  class="com.coldcore.coloradoftp.plugin.gateway.command.PassCommand"
  singleton="false">
  <property name="userDAO" ref="databaseUserDAO"/>
</bean>


As you can see all of those modules use the same PASS command but feed different DAO objects into it. And only one sign in module may be used by your FTP server.



Return to Plug-in: Gateway

Personal tools