Wing FTP Server - a Secure FTP Server

FTP Basic Knowledge

What is FTP?
The File Transfer Protocol (FTP) is a network protocol used to transfer data from one computer to another through a network, such as over the Internet. FTP is a commonly used protocol for exchanging files over any TCP/IP based network to manipulate files on another computer on that network regardless of which operating systems are involved (if the computers permit FTP access). There are many existing FTP Client and server programs. FTP servers can be set up anywhere between game servers, voice servers, internet hosts, and other physical servers.

What is FXP
File eXchange Protocol (FXP) is a method of data transfer which uses the FTP protocol to transfer data from one remote server to another (inter-server) without routing this data through the client's connection. Conventional FTP involves a single server and a single client; all data transmission is done between these two. In the FXP session, a client maintains a standard FTP connection to two servers, and can direct either server to connect to the other to initiate a data transfer. The advantage of using FXP over FTP is evident when a high-bandwidth server demands resources from another high-bandwidth server, but only a low-bandwidth client, such as a network administrator working away from location, has the authority to access the resources on both servers.

Anonymous FTP
Many sites that run FTP servers enable anonymous ftp. Under this arrangement, users do not need an account on the server. The user name for anonymous access is typically 'anonymous'. This account does not need a password. Although users are commonly asked to send their email addresses as their passwords for authentication, usually there is trivial or no verification, depending on the FTP server and its configuration. As modern FTP Client hide the login process from the user and usually don't know the user's email address, they supply dummy passwords.

Some usual FTP commands

CommandDescription
USERSend your username to the server
PASSSend your password to the server
PWDReturn the current folder name on the server
CWDChange to the specified remote folder
PASVOpen passive mode, tell server to open a port and waiting FTP client to connect in, it is useful when you are behind firewall
PORTOpen a local port, and tell server your IP address and the local port, waiting the server to connect in, If you are behind firewall or in a internel network, the server may has troubles to connect your computer, you may need a router with UPnP option enabled, the lucky thing is: our client supports UPnP!
LISTList remote directory, this command be sent after a PASV or PORT command
RESTLet server resume a broken transfer, for example, you download a large file from server, and the transfer is not completed if your internet connection losted, so when you start the transfer again, Our FTP client will send a REST command to let server starts transfer from specified file position, Saves your bandwidth and time!
FEATGet the feature list implemented by the server

FTP FEAT command
By default, FTP Rush sends a FEAT command during the login period, some server will returns a 500 error code, and some server will returns the response like below:

211-Features:
MDTM
REST STREAM
SIZE
MLST type*;size*;modify*;
MLSD
AUTH SSL
AUTH TLS
UTF8
CLNT
MFMT
211 End

When the server returns the reponse, our FTP client recogines them automatically and try to using the new feature that server supports.

For example, normally FTP clients do listing directory by sending the LIST command, but now the client finds MLSD command in the server response, then it will sends MLSD command instead of LIST command.