rana_b 2002/10/29 09:01:53
Modified: ftpserver/src/xdocs menu.xml index.xml
Added: ftpserver/src/xdocs site.xml ldap.xml jdbc.xml
Log:
Proper document added for the first time
Revision Changes Path
1.2 +3 -3 jakarta-avalon-apps/ftpserver/src/xdocs/menu.xml
Index: menu.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/xdocs/menu.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- menu.xml 26 Jul 2002 14:26:56 -0000 1.1
+++ menu.xml 29 Oct 2002 17:01:52 -0000 1.2
@@ -13,9 +13,9 @@
</menu>
<menu label="Implementations">
- <item name="Core FTP Server" href="coreserver.html"/>
- <item name="Settings Server" href="settingsserver.html"/>
- <item name="Alternative Settings Server"
href="altsettingsserver.html"/>
+ <item name="LDAP Support" href="ldap.html"/>
+ <item name="DB Support" href="jdbc.html"/>
+ <item name="SITE Command" href="site.html"/>
</menu>
</body>
1.5 +19 -2 jakarta-avalon-apps/ftpserver/src/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/xdocs/index.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- index.xml 9 Mar 2002 15:21:42 -0000 1.4
+++ index.xml 29 Oct 2002 17:01:52 -0000 1.5
@@ -7,7 +7,7 @@
<title>Avalon Applications - FtpServer</title>
<subtitle>Introduction</subtitle>
<authors>
- <person id="TODO" name="TODO" email="[EMAIL PROTECTED]"/>
+ <person id="ranab" name="Rana Bhattacharyya" email="[EMAIL PROTECTED]"/>
</authors>
<notice>
FtpServer documentation is under construction. Everything you
@@ -31,10 +31,27 @@
server.
</p>
</s1>
+ <s1 title="Features">
+ <ol>
+ <li>100% pure Java, free, open source resumable FTP server!!!</li>
+ <li>Multi platform support and multithreaded design.</li>
+ <li>User virtual directory, write permission, idle time-out and
upload/download bandwidth limitation support.</li>
+ <li>You can monitor all the user activities.</li>
+ <li>Anonymous login support.</li>
+ <li>Both upload and download files are resumable.</li>
+ <li>Handles both ASCII and binary data transfers.</li>
+ <li>IP restriction support. You can use a limited set of regular
expressions (*?[^-]) to specify the allowed/banned IPs.</li>
+ <li>The server reloads the user data at a regular interval if
necessary.</li>
+ <li>Database and LDAP can be used to store user data.</li>
+ <li>Default users admin/admin and anonymous will be created by the server
when you start it for the first time.</li>
+ <li>New user managers can be added very easily by adding new user
manager.</li>
+ <li>Supports SITE commands. Use SITE HELP to get the available
commands.</li>
+ </ol>
+ </s1>
</body>
<footer>
<legal>
- Copyright (c) @year@ The Apache Organization. All rights reserved.
+ Copyright (c) 2001-2002 The Apache Organization. All rights reserved.
</legal>
</footer>
</document>
1.1 jakarta-avalon-apps/ftpserver/src/xdocs/site.xml
Index: site.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">
<document>
<header>
<title>SITE Command</title>
<authors>
<person id="ranab" name="Rana Bhattacharyya" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<s1 title="Overview">
<p>SITE command is used by the server to provide services specific to the
system. Most of the SITE commands
can be used by the admin only. You can get all the available SITE commands
by "SITE HELP".
</p>
<p>All the server administrative tasks can be performed by the SITE command. So
the administrator
can monitor, control the server remotely. All the available SITE commands
descriptions with sample outputs are as follows:
</p>
</s1>
<s1 title="SITE HELP">
<p>
This is the only SITE command that can be executed by non-admin user. It
returns all the available SITE commands.
</p>
<source>
ftp> quote SITE HELP
200-
ADDIP <IP> : add banned IP entry
ADDUSER <userName> : add user
DELIP <IP> : delete banned IP entry
DELUSER <userName> : delete user
DESCUSER <userName> : describe user
HELP : display this message
KICK <userName> : close the connection
LISTIP : display all banned IPs
LISTUSER : display all user names
SETATTR <userName> <attrName> <attrValue> : set user
attributes
STAT : show statistics
WHO : display all connected users
200
ftp>
</source>
</s1>
<s1 title="SITE WHO">
<p>
You can get the list of all the currently connected user by this SITE
command. It returns user name, client IP, login time and last access time.
You can disconnect a client connection using SITE KICK <userName>. If
an user has logged-in multiple times, all these connections will
get disconnected.
</p>
<source>
ftp> quote SITE WHO
200-
admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37
admin 127.0.0.1 10/17 19:46:13 10/17 20:17:24
anonymous 127.0.0.1 10/17 19:46:21 10/17 20:16:45
anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50
ranab 127.0.0.1 10/17 20:09:39 10/17 20:09:40
200
ftp> quote SITE KICK ranab
200 Command SITE okay
ftp> quote SITE WHO
200-
admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37
admin 127.0.0.1 10/17 19:46:13 10/17 20:18:33
anonymous 127.0.0.1 10/17 19:46:21 10/17 20:18:16
anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50
200
ftp>
</source>
</s1>
<s1 title="SITE LISTIP">
<p>
SITE LISTIP returns all the banned/allowed IPs.
New entries can be added by SITE ADDIP <entry>.
Similarly existing entries can be removed by SITE DELIP <entry>.
</p>
<source>
ftp> quote SITE LISTIP
200-
200
ftp> quote SITE ADDIP 111.222.*
200 Command SITE okay
ftp> quote SITE ADDIP 222.111.100.*
200 Command SITE okay
ftp> quote SITE LISTIP
200-
111.222.*
222.111.100.*
200
ftp> quote SITE DELIP 111.222.*
200 Command SITE okay
ftp> quote SITE LISTIP
200-
222.111.100.*
200
ftp>
</source>
</s1>
<s1 title="SITE LISTUSER">
<p>
This command returns all the user names in the user store.
By executing SITE DESCUSER <userName> we can get the user parameters
(except password).
Existing users can be removed by SITE DELUSER <userName>.
</p>
<source>
ftp> quote SITE LISTUSER
200-
admin
anonymous
ranab
user1
200
ftp> quote SITE DESCUSER user1
200-
login : user1
password : ******
home : C:/
writepermission : true
enable : true
maxidletime : 1800
maxuploadrate : 0
maxdownloadrate : 0
200
ftp> quote SITE DELUSER user1
200 Command SITE okay
ftp> quote SITE LISTUSER
200-
admin
anonymous
ranab
200
ftp>
</source>
</s1>
<s1 title="SITE ADDUSER">
<p>
New users can be added using this command.
The newly created user will have default parameters. The attributes are :
</p>
<ul>
<li>password (default - empty string : "")</li>
<li>home (default - configured default root)</li>
<li>writepermission (default - false)</li>
<li>enable (default - false)</li>
<li>maxidletime (default - configured default idle time)</li>
<li>maxuploadrate (default - no limit)</li>
<li>maxdownloadrate (default - no limit)</li>
</ul>
<p>
We can change any user attribute by SITE SETATTR <userName>
<attrName> <attrValue> command.
</p>
<source>
ftp> quote SITE LISTUSER
200-
admin
anonymous
ranab
200
ftp> quote SITE ADDUSER user2
200 Command SITE okay
ftp> quote SITE DESCUSER user2
200-
login : user2
password : ******
home : C:/
writepermission : false
enable : false
maxidletime : 300
maxuploadrate : 0
maxdownloadrate : 0
200
ftp> quote SITE SETATTR user2 password userpassword
200 Command SITE okay
ftp> quote SITE SETATTR user2 home C:/myCode
200 Command SITE okay
ftp> quote SITE SETATTR user2 enable true
200 Command SITE okay
ftp> quote SITE SETATTR user2 maxuploadrate 5600
200 Command SITE okay
ftp> quote SITE DESCUSER user2
200-
login : user2
password : ******
home : C:/myCode/
writepermission : false
enable : true
maxidletime : 300
maxuploadrate : 5600
maxdownloadrate : 0
200
ftp> quote SITE LISTUSER
200-
admin
anonymous
ranab
user2
200
ftp>
</source>
</s1>
</body>
<footer>
<legal>
Copyright (c) 2001-2002 The Apache Organization. All rights reserved.
</legal>
</footer>
</document>
1.1 jakarta-avalon-apps/ftpserver/src/xdocs/ldap.xml
Index: ldap.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">
<document>
<header>
<title>LDAP Support</title>
<authors>
<person id="ranab" name="Rana Bhattacharyya" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<s1 title="Overview">
<p>
The LdapUserManager is an user manager implementation that
authenticates against an
LDAP server using JNDI login using the ftp server configuration options. You
would use
the LdapUserManager if your username and credential information are store in
an LDAP
server that is accessible using a JNDI LDAP provider.
</p>
<p>
This user manager has been tested using Netscape Directory Server 4.1.
LDAP requires the password to be nonempty for simple authentication.
So instead of using empty string password (""), we will be using
single space (" ").
The required LDAP attribute types:
</p>
<ul>
<li>memberuid</li>
<li>uid</li>
<li>cn</li>
<li>sn</li>
<li>userpassword</li>
<li>objectclass</li>
<li>enableflag (created by ftp-db.ldif file)</li>
<li>homedirectory</li>
<li>writepermission (created by ftp-db.ldif file)</li>
<li>idletime (created by ftp-db.ldif file)</li>
<li>uploadrate (created by ftp-db.ldif file)</li>
<li>downloadrate (created by ftp-db.ldif file)</li>
</ul>
<p>
Some of the above mentioned attribute types are created by ftp-db.ldif
schema file.
The schema file also creates an object class called ftpUsers derived from
inetOrgPerson and have all these attributes. Assumed LDAP objectclass
hierarchy:
</p>
<source>
top
|
person
|
organizationalPerson
|
inetOrgPerson
|
ftpUsers
</source>
<p>
Load LDAP schema ftp-db.ldif to add user manager attributes. The commands to
load the schema is
</p>
<source>
ldapmodify -v -h localhost -p 389 -D "cn=Directory Manager" -w
<password> -f ftp-db.ldif
</source>
<p>
Please change host, port, user and password parameters.
</p>
</s1>
<s1 title="Configuration">
<s2 title="ftp-assembly.xml">
<p>
The first step is to make sure that we are using the right user manager
implementation.
The fully qualified name of the LDAP based user manager is
<em>org.apache.avalon.ftpserver.LdapUserManager</em>.
So we have to use this class name in <em>ftp-assembly.xml</em> file.
The user-manager block should be:
</p>
<source>
<!-- user manager block -->
<block
class="org.apache.avalon.ftpserver.usermanager.LdapUserManager"
name="user-manager"/>
</source>
</s2>
<s2 title="ftp-config.xml">
<p>
The next step is to use appropriate configuration parameters. So we have
to modify ftp-config.xml file.
</p>
<source>
<!-- LDAP based user manager -->
<url>ldap://localhost:389</url>
<admin>cn=Directory Manager</admin>
<password>password</password>
<authentication>simple</authentication>
<root>ou=people,o=apache.org</root>
<prefix>uid=</prefix>
<suffix>,ou=people,o=apache.org</suffix>
</source>
<p>
Configuration parameters :
</p>
<ul>
<li><strong>url</strong> : The ldap URL for the LDAP server.
For example, ldap://localhost:389 URL means LDAP has been installed in
the local machine and the port is 389.</li>
<li><strong>admin</strong> : This is the distinguished name (DN) of the
LDAP administrator.</li>
<li><strong>password</strong> : LDAP administrator's password.</li>
<li><strong>authentication</strong> : Security level to use. This defaults
to "simple".</li>
<li><strong>root</strong> : The LDAP root where the ftp users will be
stored.</li>
<li><strong>prefix</strong> : A prefix to add to the username to form the
user distinguished name (DN).
See <em>suffix</em> for more info..</li>
<li><strong>suffix</strong> : Suffix to add to the username when forming
the user distiguished name (DN).
This is useful if you prompt a user for a username and you don't want
the user to have to enter the
fully distinguished name. Using this property and <em>prefix</em> the
userDN will be formed as <em>String userDN = prefix + username + suffix;</em></li>
</ul>
</s2>
</s1>
</body>
<footer>
<legal>
Copyright (c) 2001-2002 The Apache Organization. All rights reserved.
</legal>
</footer>
</document>
1.1 jakarta-avalon-apps/ftpserver/src/xdocs/jdbc.xml
Index: jdbc.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">
<document>
<header>
<title>Database Support</title>
<authors>
<person id="ranab" name="Rana Bhattacharyya" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<s1 title="Overview">
<p>
DbUserManager is a JDBC based user manager. You would use this module if you
have your
username, password and other informations in a JDBC accessible database.
</p>
<p>
This user manager has been tested using Oracle 8i and mySQL server.
All the user informations are stored in FTP_USER table. The SQL file is
<em>ftp-db.sql</em>.
</p>
<table>
<caption><strong>FTP_USER</strong></caption>
<tr><td><strong>Name</strong></td><td><strong>Datatype</strong></td></tr>
<tr><td>LOGIN_ID</td><td>VARCHAR(64), Primary key</td></tr>
<tr><td>PASSWORD</td><td>VARCHAR(64)</td></tr>
<tr><td>HOME_DIR</td><td>VARCHAR(128)</td></tr>
<tr><td>ENABLED</td><td>VARCHAR(8)</td></tr>
<tr><td>WRITE_PERM</td><td>VARCHAR(8)</td></tr>
<tr><td>IDLE_TIME</td><td>INT</td></tr>
<tr><td>UPLOAD_RATE</td><td>INT</td></tr>
<tr><td>DOWNLOAD_RATE</td><td>INT</td></tr>
</table>
</s1>
<s1 title="Configurations">
<s2 title="ftp-assembly.xml">
<p>
The first step is to make sure that we are using the right user manager
implementation.
The fully qualified name of the LDAP based user manager is
<em>org.apache.avalon.ftpserver.DbUserManager</em>.
So we have to use this class name in <em>ftp-assembly.xml</em> file. The
user-manager block should be:
</p>
<source>
<!-- user manager block -->
<block
class="org.apache.avalon.ftpserver.usermanager.DbUserManager"
name="user-manager"/>
</source>
</s2>
<s2 title="ftp-config.xml">
<p>
The next step is to use appropriate configuration parameters. So we have
to modify ftp-config.xml file.
The sample block is for MySQL database.
</p>
<source>
<!-- Database based user manager -->
<driver>org.gjt.mm.mysql.Driver</driver>
<url>jdbc:mysql://localhost/ftpDB</url>
<user>user</user>
<password>password</password>
</source>
<p>
Configuration parameters :
</p>
<ul>
<li><strong>driver</strong> : Fully qualified name of the JDBC driver to
be used.</li>
<li><strong>url</strong> : JDBC database URL.</li>
<li><strong>user</strong> : Database user.</li>
<li><strong>password</strong> : Database password.</li>
</ul>
<p>
Besides these, you need to copy the driver jar file in the lib directory.
</p>
</s2>
</s1>
</body>
<footer>
<legal>
Copyright (c) 2001-2002 The Apache Organization. All rights reserved.
</legal>
</footer>
</document>
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>