What is FTP? How to set up FTP Server?
File transfer protocol (FTP) has been around for more time than HTTP and TCP/IP protocol and has more than 40+ years of existence in the industry. Its original specification was written way back in 1971 and initial FTP clients were command line programs, and as they adopted, they grew into GUI (Graphic User Interface) and installed on numerous systems, desktops, mobile devices and so on.
In this article we will learn more about FTP and how it works, setting up FTP access on systems, its features, functions and limitations in this article.
About – FTP (File Transfer Protocol)
File transfer protocol (FTP) is a standard network protocol used for transferring computer files between a client and a server across a computer network. Users can use FTP via a command line interface such as DOS in Windows and Terminal in UNIX systems or MacOS.
To login to FTP server a user name and password is required and the port number (When logging from command line interface). The FTP protocol uses port 20 and 21 by default. FTP can also work anonymously where the default user name can be ‘anonymous’ or email address as the password.
File Transfer Types
FTP supports two kinds of file transfers: Binary and ASCII
- ASCII is a 7-bit character set which contains 128 characters. Any file which is text based such as HTML, TXT, PostScript etc are ASCII files.
- Binary files have a different structure and require different transfer types which includes images, applications, algorithm generated packages such as .ZIP, and much more.
Use of Browser FTP let you offer limited functionality to download files. Some examples of FTP Servers and its clients are FileZilla server and FileZilla, SolarWinds and WinSCP, Serv-U and SmartFTP.
Features of FTP Access
- FTP is one of the fastest ways to transfer files from one computer to another computer.
- FTP is very efficient as we do not need to complete all the operations to get the entire file.
- FTP access is secure as we need to login with username and password
- FTP allows you to transfer the files back and forth.
How to set up FTP Server?
FTP works in the Client – Server model. The server hosts the files to be shared and the client provides the interface to access, download or upload files to the file server. The systems transferring files can be within the same network where FTP is configured or could be outside the network (Over the Internet). FTP uses two ports, one for connection and one for sending data.
FTP runs in two modes – Active and Passive.
It uses two channels: command and data channel.
- Command channel is used for sending commands and responses and
- Data channel is meant for sending data.
- In Active mode client launches command channel and
- In passive mode both command and data channels are established by client.
Open channel on FTP client and server
Data and other communications from clients should be able to reach FTP server to allow outgoing data and other communications from the client to FTP server.
Server-side Port 21 to be opened for initiating connection. The port used by the server to respond to clients can be between Port 21 to 1022.
Perquisites
- FTP requires IIS. Both IIS and FTP should be installed for the configuration of FTP server
- A ‘root’ folder to publish FTP
%SystemDrive%\ftp\ftproot
- Set permissions to allow anonymous access to the folder
“ICACLS “%SystemDrive%\ftp\ftproot” /Grant IUSR:R /T”
“%SystemDrive%\ ftp \ftproot”
- The root folder should be set as the path for your FTP site. The software firewall (like Windows firewall or Symantec) should allow connections to the FTP server
Step 1 : Enabling FTP in Windows if IIS is not installed
If IIS is not installed:
- Go to Start > Control Panel > Administrative Tools > Server Manager in Windows Server Manager.
- Go to Roles node. Right-click on Roles and click Add Roles
- In the Add Roles window, open Server Roles and check Web Server (IIS).
- Proceed through the setup wizard and click Install. Let installation to be completed
Step 2 : Transferring files
To transfer files, add an FTP site. Post FTP site is enabled, clients can transfer to and from the site using the FTP protocol.
Step 3 : Setting up FTP site
Go to Start > Control Panel > Administrative Tools > Internet Information Services (IIS) Manager
Expand Local server in IIS console
Right click on sites , Add FTP site type the FTP server name and the content directory path, and click Next. The directory path should be the same as the one we set permissions to allow anonymous access. Above, we used:
%SystemDrive%\ ftp \ftproot
In ‘Binding and SSL Settings’ type the IP address of the server
Check the Start FTP Site Automatically option. Choose SSL Based on Constraint. Click Next.
Select Basic for authentication and Click Finish to complete FTP site creation
Step 4: Accessing files on the FTP server
To access files on the FTP server, open a file explorer and type ftp://serverIP. The FTP server asks for a username and password. Enter the username and password (Windows or Active Directory credentials) and click Logon. The files and folders display under the FTP server.
Continue Reading:
Difference between File Level Storage and Block Level Storage
HTTP vs TCP : Detailed Comparison
Tag:Protocols