What Is FTP? Protocol Overview

Communication and data transfer

FTP may run in active or passive mode, which determines how the data connection is established. In both cases, the client creates a TCP control connection from a random, usually an unprivileged, port N to the FTP serve command port 21.

- In active mode, the client starts listening for incoming data connections from the server on port M. It sends the FTP command PORT M to inform the server on which port it is listening.

The server then initiates a data channel to the client from its port 20, the FTP server data port.

- In situations where the client is behind a firewall and unable to accept incoming TCP connections, passive mode may be used. In this mode, the client uses the control connection to send a PASV command to the server.

Then receives a server IP address and server port number from the server, which the client then uses to open a data connection from an arbitrary client port to the server IP address and server port number received.

"Both modes were updated in September 1998 to support IPv6. Further changes were introduced to the passive mode at that time, updating it to extended passive mode."

The server responds over the control connection with three-digit status codes in ASCII with an optional text message. For example, "200" (or "200 OK") means that the last command was successful.

___________________________________________________________________

For text files, different format control and record structure options are provided. These features were designed to facilitate files containing Telnet or ASA.

Data transfer can be done in any of three modes:

- Stream mode:
Data is sent as a continuous stream, relieving FTP from doing any processing. Rather, all processing is left up to TCP. No End-of-file indicator is needed, unless the data is divided into records.

- Block mode:
FTP breaks the data into several blocks (block header, byte count, and data field) and then passes it on to TCP.

- Compressed mode:
Data is compressed using a simple algorithm (usually run-length encoding).

____________________________________________________________________

The numbers represent the code for the response and the optional text represents a human-readable explanation or request (e.g. <Need account for storing file>).

An ongoing transfer of file data over the data connection can be aborted using an interrupt message sent over the control connection.

While transferring data over the network, four data representations can be used:

  • ASCII mode:

Used for text. Data is converted, if needed, from the sending host's character representation to "8-bit ASCII" before transmission, and (again, if necessary) to the receiving host's character representation.

As a consequence, this mode is inappropriate for files that contain data other than plain text.

  • Image mode (commonly called Binary mode):

The sending machine sends each file byte for byte, and the recipient stores the bytestream as it receives it.

(Image mode support has been recommended for all implementations of FTP).

  • EBCDIC mode:

Used for plain text between hosts using the EBCDIC character set.

  • Local mode:

Allows two computers with identical setups to send data in aproprietary format without the need to convert it to ASCII.




Join the Discussion
Write something…
Recent messages
whitsunday Premium
Hi. I appreciate the amount of effort you have put into this amazing training. Thank you.
Today, I simply want to upload images from my computer files to my wordpress site. Usually this is a simple step, but for unknown reason my images will not load occasionally and not right now.

I am advised by WA Support to do the training about FileZilla and FTP. No clue what either of them are, except for what you have explained in this training.

I've been uploading images to this same website for 3 years without filezilla or ftp.

I am not in the mood for technical training and I have my fingers crossed that you have a simple suggestion so that I can just get on with adding images and posting content.

Ignore my frustration and thanks for any advice.
Janelle
Reply
AfqmBiz Premium
Thanks for your great feedback and comment my friend. I understood and even myself sometimes hate about little details of technicality. I agree with you opting the easy way of coordinating our stuff together.

Some other times, just like me that still continue learning, this kind of technical stuff if we understood more, can help our life easier.

Just take a step at once learning, my friend. Everybody is the coaching hands right here at WA. I could learn from you too, my friend. Cheers! :)
Reply
SadieChan Premium
Wow, hope we don't have to handle all these technical skills. A pain in the neck to learn. Thanks for the training.
Reply
AfqmBiz Premium
The steps to optimizing or integrating the use of this service is actually not as difficult as the theory, Sadie, J

Just because the service has its own vulnerability in a certain aspect and if ever anybody come across this service and kinda gets stuck with vulnerability issue, they can always fall back to this introduction and tutorials.

Thanks and welcome :)
Reply
AfqmBiz Premium
Do not worry, i thought of coming out on how to operate this through FileZilla step by step. But i need to compile those risk elements involved as most of this kind of programs under Beta Development.

It is the reason take closer interest and get involve with the memmbers for dot.org site let say to understand further its vulnerability among others.

It is really good tools to develop the direct from our owh system and network... next i think i will cover on security issues and also host of FTP providers etc for easy references.

Some other times, i found out certain review on open softwares etc not being kind to these group, team, or guys.

But not all or I mean this is subjective. Opinion of course divided but I'm giving the point of through my direct approach or engagement etc. It is a two sided world of free tools etc and world of capitalism where even a piece of advice has it own invoicing.
Reply
mybiz4u Premium
WoW, this is mighty techical:).
Thnx
Reply
annie58 Premium
Thank you for your input I know nothing about this topic. I will catch up eventually!
Reply
AfqmBiz Premium
Thats great my friend because we can set up even more beauty things for our system with FTP. Just take the learning to the core as mostly FTP platforms often have several issues now and then.
Reply
Top