FTP server and softwares
File Transfer Protocol (FTP) client-server architecture used to transfer files from one host to another host over a TCP network.It is authenticate using a clear-text protocol.
Basic ports using is 21 for the command port and 20 for the data port.
In active mode both server and client required ports open behind firewalls.
In passive mode server only required to open ports.
Read http://slacksite.com/other/ftp.html to difference between Active/Passive FTP
common using FTP softwares for windows FileZilla,freeFTPd,WS FTP and for unix/linux ProFTPD,vsftpd,wu-ftpd
Using from a web browser
ftp://[<user>[:<password>]@]<host>[:<port>]/<url-path>
windows command
ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
* -v – Suppresses verbose display of remote server responses.
* -n – Suppresses auto-login upon initial connection.
* -i – Turns off interactive prompting during multiple file transfers.
* -d – Enables debugging, displaying all ftp commands passed between the client and server.
* -g – Disables filename globbing, which permits the use of wildcard chracters in local file and path names.
* -s:filename – Specifies a text file containing ftp commands; the commands will automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
* -a – Use any local interface when binding data connection.
* -w:windowsize – Overrides the default transfer buffer size of 4096.
* computer – Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last parameter on the line.
Understand FTP server codes
—————————
1XX – Positive Preliminary reply
2XX – Positive Completion reply
3XX – Positive Intermediate reply
4xx – Transient Negative Completion reply
5xx – Permanent Negative Completion reply
6xx – Protected reply
Code Explanation
100 Series: The requested action is being initiated, expect another reply before proceeding with a new command.
110 Restart marker replay . In this case, the text is exact and not left to the particular implementation; it must read: MARK yyyy = mmmm where yyyy is User-process data stream marker, and mmmm server’s equivalent marker (note the spaces between markers and “=”).
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status okay; about to open data connection.
200 Command okay.
202 Command not implemented, superfluous at this site.
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.On how to use the server or the meaning of a particular non-standard command. This reply is useful only to the human user.
215 NAME system type. Where NAME is an official system name from the registry kept by IANA.
220 Service ready for new user.
221 Service closing control connection.
225 Data connection open; no transfer in progress.
226 Closing data connection. Requested file action successful (for example, file transfer or file abort).
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
228 Entering Long Passive Mode (long address, port).
229 Entering Extended Passive Mode (|||port|).
230 User logged in, proceed. Logged out if appropriate.
231 User logged out; service terminated.
232 Logout command noted, will complete when transfer done.
250 Requested file action okay, completed.
257 “PATHNAME” created.
331 User name okay, need password.
332 Need account for login.
350 Requested file action pending further information
421 Service not available, closing control connection. This may be a reply to any command if the service knows it must shut down.
425 Can’t open data connection.
426 Connection closed; transfer aborted.
430 Invalid username or password
434 Requested host unavailable.
450 Requested file action not taken.
451 Requested action aborted. Local error in processing.
452 Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy).
500 Syntax error, command unrecognized. This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken. File unavailable (e.g., file not found, no access).
551 Requested action aborted. Page type unknown.
552 Requested file action aborted. Exceeded storage allocation (for current directory or dataset).
553 Requested action not taken. File name not allowed.
631 Integrity protected reply.
632 Confidentiality and integrity protected reply.
633 Confidentiality protected reply.
Installing Microsoft FTP under 2000 and 2003
——————————————–
Installing Internet Information Services
In Control Panel Select Add/Remove Windows Components.
In the Windows Components Wizard, select Internet Information Services (IIS), then click Details.Select Common Files, Documentation, File Transfer Protocol (FTP) Server, and Internet Information Services Snap-In, and then click OK and next.
If you are prompted to configure Terminal Services, click Next.
If you are prompted for a path for a FTP root folder, type a suitable folder path. The default is C:\Inetpub\Ftproot. For additional security, an NTFS drive is preferred. Click OK to continue and Click Finish.
Configuring the FTP service
Click Start, click Programs, click Administrative Tools, and then click Internet Services Manager.
Click the plus sign (+) next to the server name.
Right-click Default FTP Site, and then click Properties.
Click the Security Accounts tab.
Select Allow Anonymous Connections, and then select Allow Only Anonymous Connections.
Click the Home Directory tab.
Select Read and Log Visits, and clear Write.
Click OK to save these settings.
Configure FTP Server Authentication
———————————–
Enabling Anonymous FTP authentication method
——————————————-
In IIS Manager, right-click the FTP site, directory, virtual directory, or file you want to configure, and click Properties.
Click the Security Accounts tab.
Select the Allow anonymous connections check box.
To allow your users to gain access by Anonymous authentication only, select the Allow only anonymous connections check box.
In the User name and Password boxes, enter the Anonymous logon user name and password you want to use, and then click OK
The user name is the name of the anonymous user account, which is typically designated as IUSR_computername.
Note If the default IUSR_computername account will not be used for Anonymous FTP authentication, you must create a Windows user account appropriate for the authentication method. For more information about creating a new user account, see the procedure Create a Service Account in this section.
Set the appropriate NTFS permissions for the anonymous account.
Enabling the Basic FTP authentication method
——————————————–
Create a Windows user account appropriate for the authentication method. If appropriate, add the account to a Windows user group.
Configure NTFS permissions for the directory or file for which you want to control access.
In IIS Manager, right-click the FTP site, directory, virtual directory, or file you want to configure, and click Properties.
Click the Security Accounts tab.
Clear the Allow anonymous connections check box, and then click OK.
Posted on November 10, 2011, in General, Uncategorized, Web. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0