== Requirements == 1. BASE 3.0 or later. == Introduction == This package is an extension package to BASE that installs a small FTP server as part of the web server. It uses the Apache FTP Server library for the actual handling of the FTP protocol. * The homepage for this extension: http://baseplugins.thep.lu.se/wiki/net.sf.basedb.ftp * The Apache FTP server site: http://mina.apache.org/ftpserver/index.html == Installation == 1. Download the `base-ftpserver-*.tar.gz` file. 2. Unpack the downloaded file to a directory of your choice. 3. Copy the `ftp-config.xml` file to `WEB-INF/classes` directory. 4. The default `ftp-config.xml` file creates a regular FTP service with the control connection on port 2121. There is also an example of an SSL-enabled configuration. For more information about configuration options see: http://mina.apache.org/ftpserver/documentation.html 5. Copy the 'base-ftpserver.jar' file to your BASE plug-ins directory. Look in your 'base.config' file if you don't know where this is. 6. Go to 'Administrate->Plug-ins & Extensions->Overview' page. 7. Run the installation wizard and select to install 'base-ftpserver.jar'. 8. The FTP Server should now be running, but it only allows the root user to login. To enable other users to login you have to start an FTP client, connect to your BASE FTP server and login as root. This will register the FTP server as a new client application that is shared to `Everyone`. To limit which users that can access the FTP server go to `Administrate -> Clients` and change the sharing options for the FTP Server. 9. Done. == Known issues == * BASE allows that a directory has the same name as a file. This may confuse FTP clients since that is normally not allowed. The result for certain operations is undefined for files and directories that has the same name. * BASE-files that are a link to an external URL will show up as read-only in the FTP-server. If the file size of an external file is not known it is shown as 0 in the FTP server. == Tips and tricks == * To activate a project when logging in via FTP, use a login name like `username`, where `username` is the usual login and `projectname` is the name of the project to set active. This is useful to access files that has been shared to a project, but note that the path must be accessible all they way from the root. If no project with the given name can be found, the user is logged in without an active project. * If you want to try out an SSL enabled FTP server, but doesn't have a certificate, you may create one with the following command: `keytool -genkey -keystore test.jks -storetype JKS -storepass test -keypass test -alias test` == Compiling == To compile this package you also need: 1. Ant 1.6 2. Java 1.6 Follow these instructions: 1. Download the source code from the subversion repository. See http://baseplugins.thep.lu.se/wiki/net.sf.basedb.ftp for instructions. 2. Type `ant download-lib` to automatically download the BASE core JAR file that are neeed for compilation. You can also do this manually by copying the base-core-3.0.0.jar and base-webclient-3.0.0.jar from the BASE installation directory (`/www/WEB-INF/lib/`) to the `./lib/compile` directory. 3. Type `ant` to compile the code and generate the `base-ftpserver.jar` file in the project directory. 4. Use `ant package` to create a downloadable tar.gz package. Tip: If you need different values for any of the properties defined in the 'build.xml' file, create a file named 'build.properties' and set the values there.