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