How to Install FTP Server on Windows Server 2021.
FTP, short for File Transfer Protocol, is a standard protocol for exchanging files over the Internet or a simple local area network. The FTP servers have been around for over 30 years and provide simple yet efficient file sharing.
FTP is now being replaced by more secure options such as SFTP (Secure File Transfer Protocol) and FTPS (FTP over SSL), which encrypt data sent to and from servers. However, it would be prudent to evaluate the basics of setting up an FTP server and see how it can be configured for simple file sharing.
In this guide, we will walk you through the installation and configuration of an FTP server in Windows Server 2019. There are two ways to install an FTP server. You can use the graphical Server Manager tool or Windows Powershell if you like working with the terminal. We’ll look at each of them in turn.
How to Install FTP Server using Server Manager
Server Manager is a graphical console introduced in Windows Server 2008. The goal was to help system administrators easily install and manage various features and roles on a server. To install an FTP server using Server Manager, follow the steps as shown in the figure.
Step 1. Start Server Manager
Typically, the Server Manager utility starts automatically after you log on. Alternatively, you can click the Start menu button and select Server Manager from the drop-down menu that appears.
Once launched, click on the Add Roles and Features option as shown.
Step 2. Proceed with the installation
When you select Add Roles and Features, the installation wizard starts. The wizard gives you a summary of the tasks you can perform, such as adding/removing roles and features. There are a few prerequisites you need to fulfill before continuing.
After you have viewed the summary, just click Next.
Step 3. Select the type of installation
In the next step, select the “Role or Feature-Based” installation and click Next.
After that, you will need to select a server on which you will install roles and features. By default, the server you are working on will be selected. Just accept the defaults and click Next.
Step 5. Select Server Roles to Install
In the next step, a list of server roles will be listed. Click on the “IIS Web Server” option.
A pop-up window will open listing the roles to be installed as shown.
Click Add Features and click Next to proceed to the next step.
Step 6. Select server functions
Nothing special is required at this stage, so click Next again.
Step 7: Overview of Internet Information Services (IIS)
The next step gives you an idea of what a web server is and what role it plays. So again, just click Next to move on to the next step.
Step 8. Select Role Services
This is the most important step in which we choose the FTP function. Just scroll and check the FTP Server checkbox and the corresponding FTP sub-options (FTP service and FTP extensibility). Then click Next.
Step 9. Confirm Installation
Finally, you will be presented with a summary of the roles and features that you have chosen to install. To confirm and start the installation process, click the Install button.
The installation will take a while, so a little patience will come in handy. After the installation is complete, restart the server so that the roles and features are fully enabled.
As we mentioned, we can install FTP using Windows Powershell. All the steps we just went through can be summarized in one command in Windows Powershell as follows:
Install-WindowsFeature Web-FTP-Server -IncludeManagementTools
Step 10: Create FTP Directory
At this point, we have installed the FTP server function on the system and a default root directory is created for this. The path to the root directory is in C: inetpub.
We are going to create our own FTP directory where we are going to host files and directories that authorized users will have access to over the network.
Therefore, go to the path C: inetpub. Right-click and select New, then Folder. Give the folder the desired name. In this case, we have created a folder named my FTP directory.
We need to assign the necessary permissions to this directory so that an authorized user can read its contents. To do this, right-click the directory and select Properties.
In the pop-up Properties window, click the Security tab to configure the permissions. Select the group that you want to allow access to the directory. In this case, I selected the Users group. Then click the Change button to assign permissions to the group.
In our example, we clicked “Full Control” and click the “Apply” button.
Then click “OK”. You will be returned to the Properties window, where you will click the OK button again.
Step 11: Create an FTP Site
We assigned all the permissions to our FTP directory to the Users group. The next step is to create an FTP site, which we will map to an FTP directory.
In Server Manager, click Tools, then select Internet Service Information (IIS) Manager.
In the IIS Manager window that appears, click the server name in the left pane to open additional options. Right-click the Sites option and select Add FTP Site.
In the next step, specify the FTP site name and physical path by clicking on the adjacent three-dot button and navigating to the FTP directory we created in the previous step.
Then click “OK” then “Next” to go to the next step.
In the “Binding and SSL Settings” step, specify the IP address of your server and the FTP port. Be sure to select the No SSL option as we are not using an SSL certificate to secure the site.
The last step requires you to select an authentication type and configure which users will have access to the FTP site. Select Basic Authentication.
When logging in, click on the “Specified users” option – if you want one user to have access to the site – and enter the username right below it.
Alternatively, you can allow the user group by selecting Specified Roles or User Groups and specifying the user group in the provided “text box”. Then check the Read and Write permissions and click Finish.
Up to this point, we have successfully configured the FTP server. All that remains is to configure the firewall to allow remote users to access the FTP site.
Step 12: Configure Firewall
FTP is listening on port 21 and therefore we need to allow this port through the firewall. To get started, click the start menu button and search for “Advanced Security Firewall”
In the left pane, click Inbound Rules, go to the far right corner and click New Rule.
In the Rule Type window, select Predefined and select FTP Server from the drop-down menu. Click Next.
Make sure all firewall rules are disabled and click Next.
Finally, click on “Allow the connection” and click “Finish”.
Our FTP server can now be accessed remotely from a Windows or Linux / UNIX system. It remains only to check if we can establish a connection to the server.
Step 13: Test the FTP Server
To check if your FTP server is working as expected, go to the remote system and run a command prompt. Then enter the command below:
You will need to authenticate, so provide your username and password.
The above output confirms that we were able to successfully log in.
Let’s try something a little more ambitious. We’re going to create a directory and navigate to it using the commands shown:
ftp> mkdir reports
ftp> cd reports
To check for the existence of a directory, use the ls command as you would on a Linux system when listing files.
Alternatively, you can go to your browser and navigate to the specified URL:
ftp: // Server IP
In the authentication pop-up window, enter your username and password and click the Login button.
And voila! Here is your catalog!
This confirms that our FTP server is working properly.
This concludes today’s topic. We have successfully installed and configured FTP Server on Windows Server 2019. FTP Server provides a convenient way to host and share files and directories over the network for specific users or user groups in Active Directory.
However, as we pointed out earlier, FTP is now considered insecure and additional steps are required to secure it with an SSL certificate so that attackers do not intercept the communication between the FTP server and the client PC. Let us know your thoughts in the comments. Enjoy!
How to Install FTP Server on Windows Server 2021
How to Install FTP Server on Windows Server 2021