You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by bu...@apache.org on 2012/11/15 14:09:01 UTC

svn commit: r838429 [5/9] - in /websites/staging/mina/trunk/content: ./ asyncweb-project/ ftpserver-project/ vysper-project/

Added: websites/staging/mina/trunk/content/ftpserver-project/features.html
==============================================================================
--- websites/staging/mina/trunk/content/ftpserver-project/features.html (added)
+++ websites/staging/mina/trunk/content/ftpserver-project/features.html Thu Nov 15 13:08:54 2012
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+	<title>FtpServer Features &mdash; Apache MINA</title>
+	
+		<link href="./../css/common.css" rel="stylesheet" type="text/css">
+		<link href="./../css/mina.css" rel="stylesheet" type="text/css">
+	
+</head>
+  <body>
+    <div id="container">
+      <div id="header">
+        <div id="subProjectsNavBar">
+          <a href="./../">
+            
+              <strong>Apache MINA Project</strong>
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../mina/index.html">
+            
+              MINA
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../asyncweb/index.html">
+            
+              AsyncWeb
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../ftpserver/index.html">
+            
+              FtpServer
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../sshd/index.html">
+            
+              SSHD
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../vysper/index.html">
+            
+              Vysper
+            
+          </a>
+        </div><!-- subProjectsNavBar -->
+      </div><!-- header -->
+      <div id="content">
+        <div id="leftColumn">
+                              
+          
+          
+          
+          
+          
+            <div id="navigation">
+
+    <h5>Latest Downloads</h5>
+    <ul>
+        <li><a href="./../downloads-mina.html">Mina 2.0.7</a></li>
+        <li><a href="./../downloads-ftpserver.html">FtpServer 1.0.6</a></li>
+        <li><a href="./../downloads-sshd.html">SSHD 0.8.0</a></li>
+        <li><a href="./../downloads-vysper.html">Vysper 0.7</a></li>
+    </ul>
+    <h5>Projects</h5>
+    <ul>
+        <li><a href="./../mina/index.html">MINA</a></li>
+        <li><a href="./../asyncweb/index.html">AsyncWeb</a></li>
+        <li><a href="./../ftpserver/index.html">FtpServer</a></li>
+        <li><a href="./../sshd/index.html">SSHD</a></li>
+        <li><a href="./../vysper/index.html">Vysper</a></li>
+    </ul>
+
+    <h5>Community</h5>
+    <ul>
+      <li><a href="./../contributors.html" class="external-link" rel="nofollow">Team</a></li>
+      <li><a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a></li>
+      <li><a href="http://www.apache.org/foundation/contributing.html" class="external-link" rel="nofollow">Contributing</a></li>
+      <li><a href="http://www.apache.org/" title="Apache Software Foundation" class="external-link" rel="nofollow">ASF main site</a></li>
+      <li><a href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a></li>
+      <li><a href="http://www.apache.org/foundation/sponsorship.html" title="The ASF sponsorship program" class="external-link" rel="nofollow">Sponsorship program</a></li>
+      <li><a href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</a></li>
+    </ul>
+
+    <h3><a name="Navigation-Upcoming"></a>Upcoming</h3>
+
+</div>
+
+<!-- navigation -->
+          
+        </div><!-- leftColumn -->
+      <div id="rightColumn">
+
+
+
+
+<h1 id="features">Features</h1>
+<ul>
+<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>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 to ban IPs.</li>
+<li>Database and file can be used to store user data.</li>
+<li>All the FTP messages are customizable.</li>
+<li>Implicit/explicit SSL/TLS support.</li>
+<li>MDTM support - your users can change the date-time stamp of files.</li>
+<li>"MODE Z" support for faster data upload/download.</li>
+<li>Custom user manager, IP restrictor, logger can be added easily.</li>
+<li>User event notifications can be added (Ftplet).</li>
+</ul>
+
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../privacy-policy.html">Privacy Policy</a><br />
+                Apache MINA, MINA, Apache Vysper, Vysper, Apache SSHd, SSHd, Apache FtpServer, FtpServer, Apache AsyncWeb, AsyncWeb,
+                Apache, the Apache feather logo, and the Apache Mina project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
+

Added: websites/staging/mina/trunk/content/ftpserver-project/ftplet.html
==============================================================================
--- websites/staging/mina/trunk/content/ftpserver-project/ftplet.html (added)
+++ websites/staging/mina/trunk/content/ftpserver-project/ftplet.html Thu Nov 15 13:08:54 2012
@@ -0,0 +1,626 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+	<title>FtpServer Ftplet &mdash; Apache MINA</title>
+	
+		<link href="./../css/common.css" rel="stylesheet" type="text/css">
+		<link href="./../css/mina.css" rel="stylesheet" type="text/css">
+	
+</head>
+  <body>
+    <div id="container">
+      <div id="header">
+        <div id="subProjectsNavBar">
+          <a href="./../">
+            
+              <strong>Apache MINA Project</strong>
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../mina/index.html">
+            
+              MINA
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../asyncweb/index.html">
+            
+              AsyncWeb
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../ftpserver/index.html">
+            
+              FtpServer
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../sshd/index.html">
+            
+              SSHD
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../vysper/index.html">
+            
+              Vysper
+            
+          </a>
+        </div><!-- subProjectsNavBar -->
+      </div><!-- header -->
+      <div id="content">
+        <div id="leftColumn">
+                              
+          
+          
+          
+          
+          
+            <div id="navigation">
+
+    <h5>Latest Downloads</h5>
+    <ul>
+        <li><a href="./../downloads-mina.html">Mina 2.0.7</a></li>
+        <li><a href="./../downloads-ftpserver.html">FtpServer 1.0.6</a></li>
+        <li><a href="./../downloads-sshd.html">SSHD 0.8.0</a></li>
+        <li><a href="./../downloads-vysper.html">Vysper 0.7</a></li>
+    </ul>
+    <h5>Projects</h5>
+    <ul>
+        <li><a href="./../mina/index.html">MINA</a></li>
+        <li><a href="./../asyncweb/index.html">AsyncWeb</a></li>
+        <li><a href="./../ftpserver/index.html">FtpServer</a></li>
+        <li><a href="./../sshd/index.html">SSHD</a></li>
+        <li><a href="./../vysper/index.html">Vysper</a></li>
+    </ul>
+
+    <h5>Community</h5>
+    <ul>
+      <li><a href="./../contributors.html" class="external-link" rel="nofollow">Team</a></li>
+      <li><a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a></li>
+      <li><a href="http://www.apache.org/foundation/contributing.html" class="external-link" rel="nofollow">Contributing</a></li>
+      <li><a href="http://www.apache.org/" title="Apache Software Foundation" class="external-link" rel="nofollow">ASF main site</a></li>
+      <li><a href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a></li>
+      <li><a href="http://www.apache.org/foundation/sponsorship.html" title="The ASF sponsorship program" class="external-link" rel="nofollow">Sponsorship program</a></li>
+      <li><a href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</a></li>
+    </ul>
+
+    <h3><a name="Navigation-Upcoming"></a>Upcoming</h3>
+
+</div>
+
+<!-- navigation -->
+          
+        </div><!-- leftColumn -->
+      <div id="rightColumn">
+
+
+
+
+<h1 id="ftplet">Ftplet</h1>
+<h2 id="overview">Overview</h2>
+<p>The Ftplet API is a simple API used to handle different FtpServer notifications. Apache FtpServer is a Ftplet container, allowing administrators to deploy Ftplet to carry out a variety of complex FTP event handler tasks.</p>
+<p>Implementing a custom Ftplet is generally a simple task, most of whose complexity lies in coding the actual work to be done by the Ftplet. This is largely due to the simplicity of the Ftplet interface and the fact that a DefaultFtplet class is provided as part of the Ftplet package.</p>
+<p>The Ftplet interface supports two lifecycle methods to provide initialization (the init() method) and shutdown (the destroy() method). Main processing is done in different notification methods, which take a FtpSession object and a FtpRequest object. All the notification methods return FtpletResult object to indicate the future action.</p>
+<p>There will be one instance of Ftplet object. Notification methods will be called from different connections running in different threads. So Ftplet implementation has to be thread-safe. Each connection will have its own request (FtpRequest) and session (FtpSession) objects.</p>
+<h2 id="main-classes">Main Classes</h2>
+<h3 id="ftpletresult">FtpletResult</h3>
+<p>This class encapsulates the return values of the ftplet methods. There are four static FtpletResult values.</p>
+<ul>
+<li><strong>DEFAULT</strong> : This return value indicates that the next ftplet method will be called. If no other ftplet is available, the FtpServer will process the request.</li>
+<li><strong>NO_FTPLET</strong> : This return value indicates that the other ftplet methods will not be called but the FtpServer will continue processing this request.</li>
+<li><strong>SKIP</strong> : It indicates that the server will skip everything. No further processing will be done for this request.</li>
+<li><strong>DISCONNECT</strong> : It indicates that the server will skip and disconnect the client. No other request from the same client will be served.</li>
+</ul>
+<p>So, DEFAULT &lt; NO_FTPLET &lt; SKIP &gt; DISCONNECT. If the Ftplet returns null, DEFAULT is assumed.</p>
+<h2 id="ftpsession">FtpSession</h2>
+<p>The session object is kept for the entire user session. So the attributes set by setAttribute() will be always available later unless that attribute is removed. Different session will have different FtpSession objects. From here we can get user information, data streams, user file system view etc.</p>
+<p>Ftplets can use this to send custom codes and messages to client.</p>
+<h2 id="ftprequest">FtpRequest</h2>
+<p>Provides the client request information to a ftplet. Contains the FTP command and argument.</p>
+<h2 id="ftplet_1">Ftplet</h2>
+<p>There will be only one instance of Ftplet. During startup the Ftplets will be initialized. The initialization sequence is same as the Ftplet sequence in the configuration. Then all notification methods will be called and when the FtpServer goes down, the Ftplet will be destroyed. The following method describes all the notification methods.</p>
+<table>
+<thead>
+<tr>
+<th>Method</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>onConnect</td>
+<td>Client connect notification method. This is the first method FtpServer will call. If it returns SKIP, IP restriction check, connection limit check will not be performed and the server will not send the welcome message (220).</td>
+</tr>
+<tr>
+<td>onDisconnect</td>
+<td>Client disconnect notification method. This is the last method FtpServer will call. Whatever it returns, the client connection will be closed.</td>
+</tr>
+<tr>
+<td>beforeCommand</td>
+<td>Called before the server invoke the command.</td>
+</tr>
+<tr>
+<td>afterCommand</td>
+<td>Called after the server as invoked the command.</td>
+</tr>
+</tbody>
+</table>
+<h2 id="defaultftplet">DefaultFtplet</h2>
+<p>DefaultFtplet provides some convenience methods for common FTP commands. Users can easily extend the DefaultFtplet class and choose what methods to override and handle.</p>
+<table>
+<thead>
+<tr>
+<th>Method</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>onLogin</td>
+<td>Client login notification method. This will be called after the user authentication. In this case the FtpServer has already sent the login OK (230) reply. This is called during FTP PASS request. The FTP session will be disconnected in the return value is FtpletResult.DISCONNECT.</td>
+</tr>
+<tr>
+<td>onDeleteStart</td>
+<td>Before file deletion this method will be called. Before this FtpServer will not check anything like file existence or permission. The requested file name can be get from request argument. We can get the file object from the request file system view. This is called in DELE FTP command. The method should send some responses (like 250, 450, 550) in case of SKIP return value. In this case, the server will skip the command processing and the ftplet has to send appropriate response values.</td>
+</tr>
+<tr>
+<td>onDeleteEnd</td>
+<td>This method will be called after the file deletion, successful or not. In this case the FtpServer has already sent the reply message. This is called in DELE FTP command.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>This method will be called before the file upload. The file name can be get from the request argument. We can get the data input stream from request. This will be called before the permission check. This is called during STOR command. If the method returns SKIP, it has to send responses before and after processing. For example, before opening the data input stream, the method has to notify the client with a response code 150. Similarly, after the data transfer, the method has to notify the client with a response code 226. In case of any error, the method should send different response codes like 450, 425, 426, 551.</td>
+</tr>
+<tr>
+<td>onUploadEnd</td>
+<td>This notification method will be called to indicate that the file transfer is successful and the server has send the replies. In case of any error this method will not be called. This is called in STOR command.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>This is file download request notification method called during RETR command. This will be called before the file download. We can get the file name argument from request. Similarly, the data output stream can be get from the request. This will be called before the file existance and permissoin check. If the method returns SKIP, it has to send responses before and after processing. For example, before opening the data output stream, the method has to notify the client with a response code 150. Similarly, after the data transfer, the method has to notify the client with a response code 226. In case of any error, the method should send different response codes like 450, 425, 426, 551.</td>
+</tr>
+<tr>
+<td>onDownloadEnd</td>
+<td>This notification method will be called to indicate that the file transfer is successful and the server has send the replies in RETR command.</td>
+</tr>
+<tr>
+<td>onRmdirStart</td>
+<td>Before directory deletion this method will be called during RMD command. Before this FtpServer will not check anything like directory existance or permission. The requested directory name can be get from request argument. If the method returns the SKIP, it has to send appropriate response codes to clients like 250, 450, 550.</td>
+</tr>
+<tr>
+<td>onRmdirEnd</td>
+<td>This method will be called after the invocation of the RMD command. In this case the FtpServer has already sent the reply message.</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>Before directory creation this method will be called during MKD command. Before this FtpServer will not check anything like directory existance or permission. The requested directory name can be get from request argument. If it returns SKIP, it has to send appropriate response codes to clients like 250, 550.</td>
+</tr>
+<tr>
+<td>onMkdirEnd</td>
+<td>This method will be called if the directory creation is successful in MKD command. In this case the FtpServer has already sent the reply message.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>This is file append request notification method called in APPE command. The file name can be get from the request argument. We can get the data input stream from request. This will be called before the permission check. If the method returns SKIP, it has to send responses before and after processing. For example, before opening the data input stream, the method has to notify the client with a response code 150. Similarly, after the data transfer, the method has to notify the client with a response code 226. In case of any error, the method should send different response codes like 450, 425, 426, 551.</td>
+</tr>
+<tr>
+<td>onAppendEnd</td>
+<td>This is file append success notification method called in APPE command.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>This is unique file create request notification method called in STOU command. We can get the data input stream from request. This will be called before the permission check. If the method returns SKIP, it has to send responses before and after processing. For example, before opening the data input stream, the method has to notify the client with a response code 150. Similarly, after the data transfer, the method has to notify the client with a response code 226. In case of any error, the method should send different response codes like 450, 425, 426, 551.</td>
+</tr>
+<tr>
+<td>onUploadUniqueEnd</td>
+<td>This is unique file create success notification method called in STOU command. This notification method will be called to indicate the the server has send the replies.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>This is file rename start notification method called in RNTO command. This will be called before the file existance or permission check. The "rename from" file object can be get from request object. If it returns SKIP, it has to send appropriate response codes like 503, 553, 250.</td>
+</tr>
+<tr>
+<td>onRenameEnd</td>
+<td>This is file rename success notification method called in RNFR command. This will be called before the file existance or permission check. The "rename from" file object an be get from request object. This notification method will be called after the invocation of the RNTO command and the server has send the reply message.</td>
+</tr>
+<tr>
+<td>onSite</td>
+<td>This is SITE command start notification method. It gives a chance to implement custom SITE command. If this method returns SKIP or DISCONNECT, the existing SITE commands will not be executed.</td>
+</tr>
+</tbody>
+</table>
+<h2 id="response-codes">Response Codes</h2>
+<p>This section gives an overview on different response codes which might be useful in developing custom ftplet. These commands might be used when the ftplet method return value is SKIP.</p>
+<table>
+<thead>
+<tr>
+<th>Method</th>
+<th>Response Code</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>onConnect</td>
+<td>220</td>
+<td>Service ready for new user.</td>
+</tr>
+<tr>
+<td>onConnect</td>
+<td>530</td>
+<td>No server access from the IP.</td>
+</tr>
+<tr>
+<td>onConnect</td>
+<td>530</td>
+<td>Maximum server connection has been reached.</td>
+</tr>
+<tr>
+<td>onDisconnect</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onLogin</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onDeleteStart</td>
+<td>250</td>
+<td>Requested file action okay</td>
+</tr>
+<tr>
+<td>onDeleteStart</td>
+<td>450</td>
+<td>No permission to delete.</td>
+</tr>
+<tr>
+<td>onDeleteStart</td>
+<td>550</td>
+<td>Not a valid file.</td>
+</tr>
+<tr>
+<td>onDeleteStart</td>
+<td>450</td>
+<td>Can't delete file.</td>
+</tr>
+<tr>
+<td>onDeleteEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>150</td>
+<td>File status okay; about to open data connection.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>226</td>
+<td>Transfer complete.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>550</td>
+<td>Invalid path.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>550</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>425</td>
+<td>Can't open data connection.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>426</td>
+<td>Data connection error.</td>
+</tr>
+<tr>
+<td>onUploadStart</td>
+<td>551</td>
+<td>Error on output file.</td>
+</tr>
+<tr>
+<td>onUploadEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>150</td>
+<td>File status okay; about to open data connection.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>226</td>
+<td>Transfer complete.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>550</td>
+<td>No such file or directory.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>550</td>
+<td>Not a plain file.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>550</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>425</td>
+<td>Can't open data connection.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>426</td>
+<td>Data connection error.</td>
+</tr>
+<tr>
+<td>onDownloadStart</td>
+<td>551</td>
+<td>Error on input file.</td>
+</tr>
+<tr>
+<td>onDownloadEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onRmdirStart</td>
+<td>250</td>
+<td>Directory removed.</td>
+</tr>
+<tr>
+<td>onRmdirStart</td>
+<td>550</td>
+<td>Not a valid directory.</td>
+</tr>
+<tr>
+<td>onRmdirStart</td>
+<td>550</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onRmdirStart</td>
+<td>550</td>
+<td>Can't remove directory.</td>
+</tr>
+<tr>
+<td>onRmdirEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>250</td>
+<td>Directory created.</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>550</td>
+<td>Not a valid file.</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>550</td>
+<td>Permission denied</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>550</td>
+<td>Directory already exists.</td>
+</tr>
+<tr>
+<td>onMkdirStart</td>
+<td>550</td>
+<td>Can't create directory.</td>
+</tr>
+<tr>
+<td>onMkdirEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>150</td>
+<td>File status okay; about to open data connection.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>226</td>
+<td>Transfer complete.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>550</td>
+<td>Not a plain file.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>550</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>425</td>
+<td>Can't open data connection.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>426</td>
+<td>Data connection error.</td>
+</tr>
+<tr>
+<td>onAppendStart</td>
+<td>551</td>
+<td>Error on output file.</td>
+</tr>
+<tr>
+<td>onAppendEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>150</td>
+<td>File status okay; about to open data connection.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>250</td>
+<td>filename: Transfer started.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>226</td>
+<td>filename: Transfer complete.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>550</td>
+<td>Unique file name error.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>550</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>425</td>
+<td>Can't open data connection.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>426</td>
+<td>Data connection error.</td>
+</tr>
+<tr>
+<td>onUploadUniqueStart</td>
+<td>551</td>
+<td>Error on output file.</td>
+</tr>
+<tr>
+<td>onUploadUniqueEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>250</td>
+<td>Requested file action okay, file renamed.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>503</td>
+<td>Can't find the file which has to be renamed.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>553</td>
+<td>Not a valid file name.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>553</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>553</td>
+<td>No such file or directory.</td>
+</tr>
+<tr>
+<td>onRenameStart</td>
+<td>553</td>
+<td>Can't rename file.</td>
+</tr>
+<tr>
+<td>onRenameEnd</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr>
+<td>onSite</td>
+<td>200</td>
+<td>Command SITE okay.</td>
+</tr>
+<tr>
+<td>onSite</td>
+<td>530</td>
+<td>Permission denied.</td>
+</tr>
+<tr>
+<td>onSite</td>
+<td>502</td>
+<td>Not implemented.</td>
+</tr>
+<tr>
+<td>onSite</td>
+<td>500</td>
+<td>Execution failed.</td>
+</tr>
+</tbody>
+</table>
+<h2 id="configuration">Configuration</h2>
+<p>Ftplet will get the Ftplet specific configuration as the init() method argument.</p>
+<h2 id="implementation">Implementation</h2>
+<p>Ftplets are regular POJOs. If running the server as embedded they can be added to the FtpletContainer as normal instances of the object. If using the XML configuration, they are configured and Spring beans within the ftplets element. Here's an example:</p>
+<div class="codehilite"><pre><span class="nt">&lt;ftplets&gt;</span>
+    <span class="nt">&lt;ftplet</span> <span class="na">name=</span><span class="s">&quot;ftplet1&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;beans:bean</span> <span class="na">class=</span><span class="s">&quot;org.apache.ftpserver.examples.MyFtplet&quot;</span><span class="nt">&gt;</span>
+            <span class="nt">&lt;beans:property</span> <span class="na">name=</span><span class="s">&quot;foo&quot;</span> <span class="na">value=</span><span class="s">&quot;123&quot;</span> <span class="nt">/&gt;</span>
+        <span class="nt">&lt;/beans:bean&gt;</span>
+    <span class="nt">&lt;/ftplet&gt;</span>
+<span class="nt">&lt;/ftplets&gt;</span>
+</pre></div>
+
+
+<h2 id="deployment">Deployment</h2>
+<p>The Ftplet must be added to Apache FtpServer classpath so that the Ftplet can be loaded. There are three ways you can do that.</p>
+<ol>
+<li>Modify your system CLASSPATH environment variable to include your ftplet classes.</li>
+<li>Copy your ftplet class files (unpacked) in the common/classes bdirectory of the FtpServer installation.</li>
+<li>Place a jar file containing the custom ftplet class files in the common/lib subdirectory of the FtpServer installation.</li>
+</ol>
+
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../privacy-policy.html">Privacy Policy</a><br />
+                Apache MINA, MINA, Apache Vysper, Vysper, Apache SSHd, SSHd, Apache FtpServer, FtpServer, Apache AsyncWeb, AsyncWeb,
+                Apache, the Apache feather logo, and the Apache Mina project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
+

Added: websites/staging/mina/trunk/content/ftpserver-project/ftpserver_as_windows_service.html
==============================================================================
--- websites/staging/mina/trunk/content/ftpserver-project/ftpserver_as_windows_service.html (added)
+++ websites/staging/mina/trunk/content/ftpserver-project/ftpserver_as_windows_service.html Thu Nov 15 13:08:54 2012
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+	<title>Installing FtpServer as a Windows service &mdash; Apache MINA</title>
+	
+		<link href="./../css/common.css" rel="stylesheet" type="text/css">
+		<link href="./../css/mina.css" rel="stylesheet" type="text/css">
+	
+</head>
+  <body>
+    <div id="container">
+      <div id="header">
+        <div id="subProjectsNavBar">
+          <a href="./../">
+            
+              <strong>Apache MINA Project</strong>
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../mina/index.html">
+            
+              MINA
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../asyncweb/index.html">
+            
+              AsyncWeb
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../ftpserver/index.html">
+            
+              FtpServer
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../sshd/index.html">
+            
+              SSHD
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../vysper/index.html">
+            
+              Vysper
+            
+          </a>
+        </div><!-- subProjectsNavBar -->
+      </div><!-- header -->
+      <div id="content">
+        <div id="leftColumn">
+                              
+          
+          
+          
+          
+          
+            <div id="navigation">
+
+    <h5>Latest Downloads</h5>
+    <ul>
+        <li><a href="./../downloads-mina.html">Mina 2.0.7</a></li>
+        <li><a href="./../downloads-ftpserver.html">FtpServer 1.0.6</a></li>
+        <li><a href="./../downloads-sshd.html">SSHD 0.8.0</a></li>
+        <li><a href="./../downloads-vysper.html">Vysper 0.7</a></li>
+    </ul>
+    <h5>Projects</h5>
+    <ul>
+        <li><a href="./../mina/index.html">MINA</a></li>
+        <li><a href="./../asyncweb/index.html">AsyncWeb</a></li>
+        <li><a href="./../ftpserver/index.html">FtpServer</a></li>
+        <li><a href="./../sshd/index.html">SSHD</a></li>
+        <li><a href="./../vysper/index.html">Vysper</a></li>
+    </ul>
+
+    <h5>Community</h5>
+    <ul>
+      <li><a href="./../contributors.html" class="external-link" rel="nofollow">Team</a></li>
+      <li><a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a></li>
+      <li><a href="http://www.apache.org/foundation/contributing.html" class="external-link" rel="nofollow">Contributing</a></li>
+      <li><a href="http://www.apache.org/" title="Apache Software Foundation" class="external-link" rel="nofollow">ASF main site</a></li>
+      <li><a href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a></li>
+      <li><a href="http://www.apache.org/foundation/sponsorship.html" title="The ASF sponsorship program" class="external-link" rel="nofollow">Sponsorship program</a></li>
+      <li><a href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</a></li>
+    </ul>
+
+    <h3><a name="Navigation-Upcoming"></a>Upcoming</h3>
+
+</div>
+
+<!-- navigation -->
+          
+        </div><!-- leftColumn -->
+      <div id="rightColumn">
+
+
+
+
+<h1 id="installing-ftpserver-as-a-windows-service">Installing FtpServer as a Windows service</h1>
+<h2 id="install">Install</h2>
+<p>Apache FtpServer can be installed as a Windows service using the following command:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">install</span> <span class="n">dir</span><span class="o">&gt;</span><span class="n">bin</span><span class="o">\</span><span class="n">service</span> <span class="n">install</span>
+</pre></div>
+
+
+<p>This will create a service called Apache FtpServer that can be started and stopped as a usual service.</p>
+<p>As a second parameter, the service identifier can be provided. This would normally be used if multiple FtpServer services should be installed, for example:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">install</span> <span class="n">dir</span><span class="o">&gt;</span><span class="n">bin</span><span class="o">\</span><span class="n">service</span> <span class="n">install</span> <span class="n">ftpd2</span>
+</pre></div>
+
+
+<p>Without any further options, this will use the default configuration. If you want to use for example an XML configuration file you should run:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">install</span> <span class="n">dir</span><span class="o">&gt;</span><span class="n">bin</span><span class="o">\</span><span class="n">service</span> <span class="n">install</span> <span class="n">ftpd</span> <span class="o">&lt;</span><span class="n">path</span> <span class="n">to</span> <span class="n">XML</span> <span class="n">configuration</span> <span class="n">file</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<h2 id="service-administration-gui">Service administration GUI</h2>
+<p>After installing the service, it can be further configured using the service GUI by running:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">install</span> <span class="n">dir</span><span class="o">&gt;</span><span class="n">bin</span><span class="o">\</span><span class="n">ftpdw</span>
+</pre></div>
+
+
+<h2 id="uninstall">Uninstall</h2>
+<p>To uninstall the service, use:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">install</span> <span class="n">dir</span><span class="o">&gt;</span><span class="n">bin</span><span class="o">\</span><span class="n">service</span> <span class="n">remove</span>
+</pre></div>
+
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../privacy-policy.html">Privacy Policy</a><br />
+                Apache MINA, MINA, Apache Vysper, Vysper, Apache SSHd, SSHd, Apache FtpServer, FtpServer, Apache AsyncWeb, AsyncWeb,
+                Apache, the Apache feather logo, and the Apache Mina project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
+

Added: websites/staging/mina/trunk/content/ftpserver-project/ftpserver_commands.html
==============================================================================
--- websites/staging/mina/trunk/content/ftpserver-project/ftpserver_commands.html (added)
+++ websites/staging/mina/trunk/content/ftpserver-project/ftpserver_commands.html Thu Nov 15 13:08:54 2012
@@ -0,0 +1,542 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+	<title>FtpServer FTP Commands &mdash; Apache MINA</title>
+	
+		<link href="./../css/common.css" rel="stylesheet" type="text/css">
+		<link href="./../css/mina.css" rel="stylesheet" type="text/css">
+	
+</head>
+  <body>
+    <div id="container">
+      <div id="header">
+        <div id="subProjectsNavBar">
+          <a href="./../">
+            
+              <strong>Apache MINA Project</strong>
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../mina/index.html">
+            
+              MINA
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../asyncweb/index.html">
+            
+              AsyncWeb
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../ftpserver/index.html">
+            
+              FtpServer
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../sshd/index.html">
+            
+              SSHD
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../vysper/index.html">
+            
+              Vysper
+            
+          </a>
+        </div><!-- subProjectsNavBar -->
+      </div><!-- header -->
+      <div id="content">
+        <div id="leftColumn">
+                              
+          
+          
+          
+          
+          
+            <div id="navigation">
+
+    <h5>Latest Downloads</h5>
+    <ul>
+        <li><a href="./../downloads-mina.html">Mina 2.0.7</a></li>
+        <li><a href="./../downloads-ftpserver.html">FtpServer 1.0.6</a></li>
+        <li><a href="./../downloads-sshd.html">SSHD 0.8.0</a></li>
+        <li><a href="./../downloads-vysper.html">Vysper 0.7</a></li>
+    </ul>
+    <h5>Projects</h5>
+    <ul>
+        <li><a href="./../mina/index.html">MINA</a></li>
+        <li><a href="./../asyncweb/index.html">AsyncWeb</a></li>
+        <li><a href="./../ftpserver/index.html">FtpServer</a></li>
+        <li><a href="./../sshd/index.html">SSHD</a></li>
+        <li><a href="./../vysper/index.html">Vysper</a></li>
+    </ul>
+
+    <h5>Community</h5>
+    <ul>
+      <li><a href="./../contributors.html" class="external-link" rel="nofollow">Team</a></li>
+      <li><a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a></li>
+      <li><a href="http://www.apache.org/foundation/contributing.html" class="external-link" rel="nofollow">Contributing</a></li>
+      <li><a href="http://www.apache.org/" title="Apache Software Foundation" class="external-link" rel="nofollow">ASF main site</a></li>
+      <li><a href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a></li>
+      <li><a href="http://www.apache.org/foundation/sponsorship.html" title="The ASF sponsorship program" class="external-link" rel="nofollow">Sponsorship program</a></li>
+      <li><a href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</a></li>
+    </ul>
+
+    <h3><a name="Navigation-Upcoming"></a>Upcoming</h3>
+
+</div>
+
+<!-- navigation -->
+          
+        </div><!-- leftColumn -->
+      <div id="rightColumn">
+
+
+
+
+<h1 id="ftp-commands">FTP Commands</h1>
+<p>This document describes all the FTP commands implemented.</p>
+<h2 id="abor">ABOR</h2>
+<p>Aborts the previous FTP service command and any associated transfer of data.</p>
+<h3 id="server-replies">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">226</span> <span class="n">ABOR</span> <span class="n">command</span> <span class="n">successful</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="acct">ACCT</h2>
+<p>Provides the user's account. Not used by FtpServer.</p>
+<h3 id="server-replies_1">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">202</span> <span class="n">Command</span> <span class="n">ACCT</span> <span class="ow">not</span> <span class="n">implemented</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="appe">APPE</h2>
+<p>Appends data to the end of a file on the remote host. If the file does not already exist, it is created. This command must be preceded by a PORT or PASV command.</p>
+<h3 id="server-replies_2">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">plain</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Permission</span> <span class="n">denied</span><span class="o">.</span>
+<span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">Error</span> <span class="n">on</span> <span class="n">output</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Transfer</span> <span class="n">complete</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="auth">AUTH</h2>
+<p>Establishes SSL encrypted session. Only SSL type is supported.</p>
+<h3 id="server-replies_3">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">431</span> <span class="n">Service</span> <span class="n">is</span> <span class="n">unavailable</span><span class="o">.</span>
+<span class="mi">234</span> <span class="n">AUTH</span> <span class="n">command</span> <span class="n">okay</span><span class="p">;</span> <span class="n">starting</span> <span class="n">SSL</span> <span class="n">connection</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="cdup">CDUP</h2>
+<p>Change to parent directory.</p>
+<h3 id="server-replies_4">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">250</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">such</span> <span class="n">directory</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="cwd">CWD</h2>
+<p>Changes the working directory. If directory name is not specified, root directory (/) is assumed.</p>
+<h3 id="server-replies_5">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">250</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">such</span> <span class="n">directory</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="dele">DELE</h2>
+<p>Deletes the file specified by the provided path.</p>
+<h3 id="server-replies_6">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">250</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+<span class="mi">450</span> <span class="n">No</span> <span class="n">permission</span> <span class="n">to</span> <span class="nb">delete</span><span class="o">.</span>
+<span class="mi">450</span> <span class="n">Can</span><span class="err">&#39;</span><span class="n">t</span> <span class="nb">delete</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span> <span class="n">in</span> <span class="n">parameters</span> <span class="ow">or</span> <span class="n">arguments</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="eprt">EPRT</h2>
+<p>The EPRT command allows for the specification of an extended address for the data connection. The extended address MUST consist of the network protocol as well as the network and transport addresses. The format of EPRT is EPRT |<net-prt>|<net-addr>|<tcp-port>|</p>
+<h3 id="server-replies_7">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">EPRT</span> <span class="n">is</span> <span class="n">disabled</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">553</span> <span class="n">Host</span> <span class="n">unknown</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">EPRT</span> <span class="n">IP</span> <span class="n">is</span> <span class="ow">not</span> <span class="n">same</span> <span class="n">as</span> <span class="n">client</span> <span class="n">IP</span><span class="o">.</span>
+<span class="mi">552</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">port</span> <span class="n">number</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">EPRT</span> <span class="n">command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="epsv">EPSV</h2>
+<p>The EPSV command requests that a server listen on a data port and wait for a connection.</p>
+<h3 id="server-replies_8">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">passive</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">229</span> <span class="n">Entering</span> <span class="n">passive</span> <span class="n">mode</span> <span class="p">(</span><span class="sr">&lt;message&gt;</span><span class="p">)</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="feat">FEAT</h2>
+<p>Displays the feature list.</p>
+<h3 id="server-replies_9">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">221</span> <span class="n">List</span> <span class="n">of</span> <span class="n">all</span> <span class="n">the</span> <span class="n">extensions</span> <span class="n">supported</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="help">HELP</h2>
+<p>Displays the help information.</p>
+<h3 id="server-replies_10">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">214</span> <span class="n">Help</span> <span class="n">information</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="lang">LANG</h2>
+<p>A new command "LANG" is added to the FTP command set to allow server-FTP process to determine in which language to present server greetings and the textual part of command responses.</p>
+<h3 id="server-replies_11">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">502</span> <span class="n">Not</span> <span class="n">yet</span> <span class="n">implemented</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="list">LIST</h2>
+<p>This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection. This command must be preceded by a PORT or PASV command.</p>
+<h3 id="server-replies_12">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">File</span> <span class="n">listing</span> <span class="n">failed</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Closing</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="mdtm">MDTM</h2>
+<p>Returns the date and time of when a file was modified.</p>
+<h3 id="server-replies_13">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">File</span> <span class="n">unavailable</span><span class="o">.</span>
+<span class="mi">213</span> <span class="sr">&lt;timestamp&gt;</span>
+</pre></div>
+
+
+<h2 id="mkd">MKD</h2>
+<p>This command causes the directory specified in the pathname to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).</p>
+<h3 id="server-replies_14">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Already</span> <span class="nb">exists</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">permission</span><span class="o">.</span>
+<span class="mi">250</span> <span class="n">Directory</span> <span class="n">created</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Cannot</span> <span class="n">create</span> <span class="n">directory</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="mlsd">MLSD</h2>
+<p>Causes a list to be sent from the server to the passive DTP</p>
+<h3 id="server-replies_15">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">150</span> <span class="n">File</span> <span class="n">status</span> <span class="n">okay</span><span class="p">;</span> <span class="n">about</span> <span class="n">to</span> <span class="nb">open</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Closing</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Can</span><span class="err">&#39;</span><span class="n">t</span> <span class="nb">open</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span> <span class="n">in</span> <span class="n">parameters</span> <span class="ow">or</span> <span class="n">arguments</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">File</span> <span class="n">listing</span> <span class="n">failed</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="mode">MODE</h2>
+<p>Set data transfer mode. The valid values are S and Z.</p>
+<h3 id="server-replies_16">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">504</span> <span class="n">Not</span> <span class="n">implemented</span> <span class="k">for</span> <span class="n">this</span> <span class="n">command</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="nlst">NLST</h2>
+<p>This command causes a directory listing to be sent from server to user site. The pathname should specify a directory or other system-specific file group descriptor; a null argument implies the current directory. The server will return a stream of names of files and no other information.</p>
+<h3 id="server-replies_17">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">File</span> <span class="n">listing</span> <span class="n">failed</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Closing</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="noop">NOOP</h2>
+<p>No operation.</p>
+<h3 id="server-replies_18">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">200</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="opts">OPTS</h2>
+<p>Cause the server use optional features for the command specified.</p>
+<h3 id="server-replies_19">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">500</span> <span class="n">Execution</span> <span class="n">failed</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span> <span class="n">in</span> <span class="n">parameters</span> <span class="ow">or</span> <span class="n">arguments</span><span class="o">.</span>
+<span class="mi">502</span> <span class="n">Command</span> <span class="n">OPTS</span> <span class="ow">not</span> <span class="n">implemented</span> <span class="k">for</span> <span class="o">...</span>
+<span class="n">Additional</span> <span class="k">return</span> <span class="n">codes</span> <span class="n">available</span> <span class="k">for</span> <span class="n">different</span> <span class="n">OPTS</span> <span class="n">commands</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="pass">PASS</h2>
+<p>The argument field is a Telnet string specifying the user's password. This command must be immediately preceded by the USER command.</p>
+<h3 id="server-replies_20">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">503</span> <span class="n">Login</span> <span class="n">with</span> <span class="n">USER</span> <span class="n">first</span><span class="o">.</span>
+<span class="mi">202</span> <span class="n">Already</span> <span class="n">logged</span><span class="o">-</span><span class="n">in</span><span class="o">.</span>
+<span class="mi">421</span> <span class="n">Maximum</span> <span class="n">anonymous</span> <span class="n">login</span> <span class="n">limit</span> <span class="n">has</span> <span class="n">been</span> <span class="n">reached</span><span class="o">.</span>
+<span class="mi">421</span> <span class="n">Maximum</span> <span class="n">login</span> <span class="n">limit</span> <span class="n">has</span> <span class="n">been</span> <span class="n">reached</span><span class="o">.</span>
+<span class="mi">530</span> <span class="n">Authentication</span> <span class="n">failed</span><span class="o">.</span>
+<span class="mi">230</span> <span class="n">User</span> <span class="n">logged</span> <span class="n">in</span><span class="p">,</span> <span class="n">proceed</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="pasv">PASV</h2>
+<p>This command requests the server-DTP to listen on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.</p>
+<h3 id="server-replies_21">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">passive</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">227</span> <span class="n">Entering</span> <span class="n">passive</span> <span class="n">mode</span> <span class="p">(</span><span class="sr">&lt;h1,h2,h3,h4,p1,p2&gt;</span><span class="p">)</span>
+</pre></div>
+
+
+<h2 id="pbsz">PBSZ</h2>
+<p>protection buffer size.</p>
+<h3 id="server-replies_22">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">200</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="port">PORT</h2>
+<p>The argument is a HOST-PORT specification for the data port to be used in data connection. There are defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used, the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. A port command would be:</p>
+<p>PORT h1,h2,h3,h4,p1,p2</p>
+<h3 id="server-replies_23">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">Syntax</span> <span class="n">error</span> <span class="n">in</span> <span class="n">parameters</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">Port</span> <span class="n">is</span> <span class="n">disabled</span><span class="o">.</span>
+<span class="mi">553</span> <span class="n">Host</span> <span class="n">unknown</span><span class="o">.</span>
+<span class="mi">510</span> <span class="n">PORT</span> <span class="n">IP</span> <span class="n">mismatch</span><span class="o">.</span>
+<span class="mi">552</span> <span class="n">Invalid</span> <span class="n">port</span> <span class="n">number</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">Command</span> <span class="n">PORT</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="prot">PROT</h2>
+<p>Data channel protection level. The supported level values are C, P.</p>
+<h3 id="server-replies_24">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">431</span> <span class="n">Security</span> <span class="n">is</span> <span class="n">disabled</span><span class="o">.</span>
+<span class="mi">504</span> <span class="n">Server</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">understand</span> <span class="n">the</span> <span class="n">specified</span> <span class="n">protection</span> <span class="n">level</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">Command</span> <span class="n">PROT</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="pwd">PWD</h2>
+<p>This command causes the name of the current working directory to be returned in the reply.</p>
+<h3 id="server-replies_25">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">257</span> <span class="s">&quot;&lt;current directory&gt;&quot;</span>
+</pre></div>
+
+
+<h2 id="quit">QUIT</h2>
+<p>Closes connection.</p>
+<h3 id="server-replies_26">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">200</span> <span class="n">Goodbye</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="rein">REIN</h2>
+<p>Flushes a user, without affecting transfers in progress</p>
+<h3 id="server-replies_27">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">220</span> <span class="n">Service</span> <span class="n">ready</span> <span class="k">for</span> <span class="k">new</span> <span class="n">user</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="rest">REST</h2>
+<p>The argument field represents the server marker at which file transfer is to be restarted. This command does not cause file transfer but skips over the file to the specified data checkpoint. This command shall be immediately followed by the appropriate FTP service command which shall cause file transfer to resume.</p>
+<h3 id="server-replies_28">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">number</span><span class="o">.</span>
+<span class="mi">501</span> <span class="n">Marker</span> <span class="n">cannot</span> <span class="n">be</span> <span class="n">negetive</span><span class="o">.</span>
+<span class="mi">350</span> <span class="n">Restarting</span> <span class="n">at</span> <span class="sr">&lt;position&gt;</span><span class="o">.</span> <span class="n">Send</span> <span class="n">STORE</span> <span class="ow">or</span> <span class="n">RETRIEVE</span> <span class="n">to</span> <span class="n">initiate</span> <span class="n">transfer</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="retr">RETR</h2>
+<p>This command causes the server-DTP to transfer a copy of the file, specified in the pathname, to the server- or user-DTP at the other end of the data connection. The status and contents of the file at the server site shall be unaffected.</p>
+<h3 id="server-replies_29">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">such</span> <span class="n">file</span> <span class="ow">or</span> <span class="n">directory</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">plain</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Permission</span> <span class="n">denied</span><span class="o">.</span>
+<span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">the</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">Error</span> <span class="n">on</span> <span class="n">input</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Transfer</span> <span class="n">complete</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="rmd">RMD</h2>
+<p>This command causes the directory specified in the pathname to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).</p>
+<h3 id="server-replies_30">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">permission</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">directory</span><span class="o">.</span>
+<span class="mi">250</span> <span class="n">Directory</span> <span class="n">removed</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Cannot</span> <span class="n">remove</span> <span class="n">directory</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="rnfr">RNFR</h2>
+<p>This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a RNTO command specifying the new file pathname.</p>
+<h3 id="server-replies_31">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">File</span> <span class="n">unavailable</span><span class="o">.</span>
+<span class="mi">350</span> <span class="n">Requested</span> <span class="n">file</span> <span class="n">action</span> <span class="n">pending</span> <span class="n">further</span> <span class="n">information</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="rnto">RNTO</h2>
+<p>This command specifies the new pathname of the file specified in the immediately preceding RNFR command. Together the two commands cause a file to be renamed.</p>
+<h3 id="server-replies_32">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">503</span> <span class="n">Cannot</span> <span class="n">find</span> <span class="n">the</span> <span class="n">file</span> <span class="n">which</span> <span class="n">has</span> <span class="n">to</span> <span class="n">be</span> <span class="n">renamed</span><span class="o">.</span>
+<span class="mi">553</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">valid</span> <span class="n">file</span> <span class="n">name</span><span class="o">.</span>
+<span class="mi">553</span> <span class="n">No</span> <span class="n">permission</span><span class="o">.</span>
+<span class="mi">250</span> <span class="n">Requested</span> <span class="n">file</span> <span class="n">action</span> <span class="n">okay</span><span class="p">,</span> <span class="n">file</span> <span class="n">renamed</span><span class="o">.</span>
+<span class="mi">553</span> <span class="n">Cannot</span> <span class="nb">rename</span> <span class="n">file</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="site">SITE</h2>
+<p>Handle Apache FTP Server specific custom commands. Please see the SITE commands page.</p>
+<h3 id="server-replies_33">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">200</span> <span class="n">Command</span> <span class="n">SITE</span> <span class="n">okay</span><span class="o">.</span>
+<span class="mi">502</span> <span class="n">Command</span> <span class="n">SITE</span> <span class="ow">not</span> <span class="n">implemented</span> <span class="k">for</span> <span class="n">this</span> <span class="n">argument</span><span class="o">.</span>
+<span class="mi">500</span> <span class="n">Execution</span> <span class="n">failed</span><span class="o">.</span>
+<span class="mi">530</span> <span class="n">Access</span> <span class="n">denied</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="size">SIZE</h2>
+<p>Returns the size of the file in bytes.</p>
+<h3 id="server-replies_34">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">No</span> <span class="n">such</span> <span class="n">file</span> <span class="ow">or</span> <span class="n">directory</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Not</span> <span class="n">a</span> <span class="n">plain</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">213</span> <span class="sr">&lt;size&gt;</span>
+</pre></div>
+
+
+<h2 id="stat">STAT</h2>
+<p>This command shall cause a status response to be sent over the control connection in the form of a reply.</p>
+<h3 id="server-replies_35">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">211</span> <span class="n">Statistics</span> <span class="n">information</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="stor">STOR</h2>
+<p>This command causes the server-DTP to accept the data transferred via the data connection and to store the data as a file at the server site. If the file specified in the pathname exists at the server site, then its contents shall be replaced by the data being transferred. A new file is created at the server site if the file specified in the pathname does not already exist.</p>
+<h3 id="server-replies_36">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Invalid</span> <span class="n">path</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Permission</span> <span class="n">denied</span><span class="o">.</span>
+<span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">the</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">Error</span> <span class="n">on</span> <span class="n">output</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Transfer</span> <span class="n">complete</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="stou">STOU</h2>
+<p>This command behaves like STOR except that the resultant file is to be created in the current directory under a name unique to that directory. The 250 Transfer Started response must include the name generated.</p>
+<h3 id="server-replies_37">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">550</span> <span class="n">Unique</span> <span class="n">file</span> <span class="n">name</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">550</span> <span class="n">Permission</span> <span class="n">denied</span><span class="o">.</span>
+<span class="mi">150</span> <span class="n">Opening</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">425</span> <span class="n">Cannot</span> <span class="nb">open</span> <span class="n">the</span> <span class="n">data</span> <span class="n">connection</span><span class="o">.</span>
+<span class="mi">250</span> <span class="sr">&lt;file&gt;</span> <span class="n">Transfer</span> <span class="n">started</span><span class="o">.</span>
+<span class="mi">426</span> <span class="n">Data</span> <span class="n">connection</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">551</span> <span class="n">Error</span> <span class="n">on</span> <span class="n">output</span> <span class="n">file</span><span class="o">.</span>
+<span class="mi">226</span> <span class="n">Transfer</span> <span class="n">complete</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="stru">STRU</h2>
+<p>The argument is a single Telnet character code specifying file structure. The allowed argument is F.</p>
+<h3 id="server-replies_38">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">504</span> <span class="n">Command</span> <span class="ow">not</span> <span class="n">implemented</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="syst">SYST</h2>
+<p>This command is used to find out the type of operating system at the server.</p>
+<h3 id="server-replies_39">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">215</span> <span class="n">UNIX</span> <span class="n">Type:</span> <span class="n">Apache</span> <span class="n">FTP</span> <span class="n">Server</span>
+</pre></div>
+
+
+<h2 id="type">TYPE</h2>
+<p>The argument specifies the representation type. The allowed types are A and I.</p>
+<h3 id="server-replies_40">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">504</span> <span class="n">Command</span> <span class="ow">not</span> <span class="n">implemented</span><span class="o">.</span>
+<span class="mi">200</span> <span class="n">Command</span> <span class="n">okay</span><span class="o">.</span>
+</pre></div>
+
+
+<h2 id="user">USER</h2>
+<p>The argument field is a Telnet string identifying the user. The user identification is that which is required by the server for access to its file system. This command will normally be the first command transmitted by the user after the control connections are made.</p>
+<h3 id="server-replies_41">Server Replies</h3>
+<div class="codehilite"><pre><span class="mi">501</span> <span class="n">Syntax</span> <span class="n">error</span><span class="o">.</span>
+<span class="mi">230</span> <span class="n">Already</span> <span class="n">logged</span><span class="o">-</span><span class="n">in</span><span class="o">.</span>
+<span class="mi">530</span> <span class="n">Invalid</span> <span class="n">user</span> <span class="n">name</span><span class="o">.</span>
+<span class="mi">530</span> <span class="n">Anonymous</span> <span class="n">connection</span> <span class="n">is</span> <span class="ow">not</span> <span class="n">allowed</span><span class="o">.</span>
+<span class="mi">421</span> <span class="n">Maximum</span> <span class="n">anonymous</span> <span class="n">login</span> <span class="n">limit</span> <span class="n">has</span> <span class="n">been</span> <span class="n">reached</span><span class="o">.</span>
+<span class="mi">421</span> <span class="n">Maximum</span> <span class="n">login</span> <span class="n">limit</span> <span class="n">has</span> <span class="n">been</span> <span class="n">reached</span><span class="o">.</span>
+<span class="mi">331</span> <span class="n">Guest</span> <span class="n">login</span> <span class="n">okay</span><span class="p">,</span> <span class="nb">send</span> <span class="n">your</span> <span class="n">complete</span> <span class="n">e</span><span class="o">-</span><span class="n">mail</span> <span class="n">address</span> <span class="n">as</span> <span class="n">password</span><span class="o">.</span>
+<span class="mi">331</span> <span class="n">User</span> <span class="n">name</span> <span class="n">okay</span><span class="p">,</span> <span class="n">need</span> <span class="n">password</span><span class="o">.</span>
+</pre></div>
+
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../privacy-policy.html">Privacy Policy</a><br />
+                Apache MINA, MINA, Apache Vysper, Vysper, Apache SSHd, SSHd, Apache FtpServer, FtpServer, Apache AsyncWeb, AsyncWeb,
+                Apache, the Apache feather logo, and the Apache Mina project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
+

Added: websites/staging/mina/trunk/content/ftpserver-project/ftpserver_port_21.html
==============================================================================
--- websites/staging/mina/trunk/content/ftpserver-project/ftpserver_port_21.html (added)
+++ websites/staging/mina/trunk/content/ftpserver-project/ftpserver_port_21.html Thu Nov 15 13:08:54 2012
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+	<title>FtpServer and port 21 on Linux &mdash; Apache MINA</title>
+	
+		<link href="./../css/common.css" rel="stylesheet" type="text/css">
+		<link href="./../css/mina.css" rel="stylesheet" type="text/css">
+	
+</head>
+  <body>
+    <div id="container">
+      <div id="header">
+        <div id="subProjectsNavBar">
+          <a href="./../">
+            
+              <strong>Apache MINA Project</strong>
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../mina/index.html">
+            
+              MINA
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../asyncweb/index.html">
+            
+              AsyncWeb
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../ftpserver/index.html">
+            
+              FtpServer
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../sshd/index.html">
+            
+              SSHD
+            
+          </a>
+          &nbsp;|&nbsp;
+          <a href="./../vysper/index.html">
+            
+              Vysper
+            
+          </a>
+        </div><!-- subProjectsNavBar -->
+      </div><!-- header -->
+      <div id="content">
+        <div id="leftColumn">
+                              
+          
+          
+          
+          
+          
+            <div id="navigation">
+
+    <h5>Latest Downloads</h5>
+    <ul>
+        <li><a href="./../downloads-mina.html">Mina 2.0.7</a></li>
+        <li><a href="./../downloads-ftpserver.html">FtpServer 1.0.6</a></li>
+        <li><a href="./../downloads-sshd.html">SSHD 0.8.0</a></li>
+        <li><a href="./../downloads-vysper.html">Vysper 0.7</a></li>
+    </ul>
+    <h5>Projects</h5>
+    <ul>
+        <li><a href="./../mina/index.html">MINA</a></li>
+        <li><a href="./../asyncweb/index.html">AsyncWeb</a></li>
+        <li><a href="./../ftpserver/index.html">FtpServer</a></li>
+        <li><a href="./../sshd/index.html">SSHD</a></li>
+        <li><a href="./../vysper/index.html">Vysper</a></li>
+    </ul>
+
+    <h5>Community</h5>
+    <ul>
+      <li><a href="./../contributors.html" class="external-link" rel="nofollow">Team</a></li>
+      <li><a href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</a></li>
+      <li><a href="http://www.apache.org/foundation/contributing.html" class="external-link" rel="nofollow">Contributing</a></li>
+      <li><a href="http://www.apache.org/" title="Apache Software Foundation" class="external-link" rel="nofollow">ASF main site</a></li>
+      <li><a href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</a></li>
+      <li><a href="http://www.apache.org/foundation/sponsorship.html" title="The ASF sponsorship program" class="external-link" rel="nofollow">Sponsorship program</a></li>
+      <li><a href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</a></li>
+    </ul>
+
+    <h3><a name="Navigation-Upcoming"></a>Upcoming</h3>
+
+</div>
+
+<!-- navigation -->
+          
+        </div><!-- leftColumn -->
+      <div id="rightColumn">
+
+
+
+
+<h1 id="ftpserver-and-port-21-on-linux">FtpServer and port 21 on Linux</h1>
+<p>Under Linux only programs running as root is allowed to bind and listen to ports with port numbers below 1024. However, running a server which communicates with untrusted clients as root is not recommended for security reasons. The standard way to solve this problem in servers such as Apache HTTPD is to start the server as root and bind to the privileged port and then use the setuid C function to change the user ID of the current process. In Java there is no equivalent to the setuid C function in the standard API which means that one would have to use a native library to achieve the same, something which FtpServer doesn't support at the moment.</p>
+<p>So, to have FtpServer listen on port 21 but still run it as a normal user one will have to look at other solutions such as using the firewall built into Linux. It turns out that this is really simple. Using the iptables command we can add a rule to the firewall that rewrites all TCP packets coming in on port 21 so that they are effectively forwarded to port 60021:</p>
+<div class="codehilite"><pre><span class="n">sudo</span> <span class="n">iptables</span> <span class="o">-</span><span class="n">t</span> <span class="n">nat</span> <span class="o">-</span><span class="n">A</span> <span class="n">PREROUTING</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="o">-</span><span class="n">m</span> <span class="n">tcp</span> <span class="o">--</span><span class="n">dport</span> <span class="mi">21</span> <span class="o">-</span><span class="n">j</span> <span class="n">REDIRECT</span> <span class="o">--</span><span class="n">to</span><span class="o">-</span><span class="n">ports</span> <span class="mi">60021</span>
+</pre></div>
+
+
+<p>We can now configure FtpServer to listen on port 60021 and it will be available on port 21 as well.</p>
+
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../privacy-policy.html">Privacy Policy</a><br />
+                Apache MINA, MINA, Apache Vysper, Vysper, Apache SSHd, SSHd, Apache FtpServer, FtpServer, Apache AsyncWeb, AsyncWeb,
+                Apache, the Apache feather logo, and the Apache Mina project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
+