Introduction to the process of building your own FTP and SFTP servers

Introduction to the process of building your own FTP and SFTP servers

FTP and SFTP are widely used as file transfer protocols. In order to develop related functions, it is often necessary to build an FTP or SFTP server on your own computer or virtual machine, and then carry out corresponding development. This article is used to teach you how to build an FTP server step by step.

Operating environment and software:
FTP server environment: WIN7 Professional Edition installed on the virtual machine, 32-bit or 64-bit is OK, here is a 64-bit virtual machine network settings: Note that it must be set to bridge mode, otherwise the IP address and the physical machine may communicate abnormally.

insert image description here

**FTP client software: **Open source and free FileZilla-3.56.0 32-bit and 64-bit are both available. Please search Baidu for the download address.

It is recommended to download the green version directly, download and unzip it for use.

**FTP server software: **Core FTP Server 32-bit and 64-bit are both available, whichever is more suitable for your operating system

Search engine for the keyword "Core FTP"

insert image description here

Test Method:

Both the FTP client and the FTP server are implemented in the virtual machine.
If the virtual machine can connect but the physical machine cannot, there are two possibilities:
1. The virtual machine uses NAT network mode and can be changed to bridge
2. The firewall on the virtual machine side blocks it, and you need to create outbound and inbound exception rules for ports 21 and 22.

When installing Core FTP Server, use the default settings. After the installation is complete, right-click and run as administrator.

Core FTP Server supports:
1. Set up a separate FTP server;
2. Set up a separate SFTP server;
3. Set up FTP and SFTP servers at the same time. Here is the configuration method:

insert image description here

Then create a new plan:

insert image description here

The following is an example of how to set up basic information:
The IP address is set to the IP address where the service software is installed. In this example, it is installed on the virtual machine, and its IP is 192.168.3.104

Supported service type settings:
1. If you only want to establish FTP and not SFTP, then do not check the following four options
2. If you only want to establish SFTP and not FTP, just check DisableFTP
3. If you want to establish FTP and SFTP at the same time, then only check SSH/SFTP

insert image description here

After the basic settings are completed, there is a key setting. If this is not set, SFTP will be available but FTP will not be available:
Or the settings page just now:

insert image description here

You need to set a password here, and don't worry about anything else.

insert image description here

After setting the password, it becomes like this:
All the settings are as follows

insert image description here

If you only use SFTP, this is all you need. However, if you want to enable FTP, you also need to change the detailed settings of FTP. The FTP server established by the default options cannot be connected.

insert image description here

The content in the FTP detailed settings is as follows: I used the following configuration:
Pay attention to the encoding settings below. It is recommended to set it to UTF-8. Otherwise, if the FTP directory contains Chinese directories, garbled characters will appear when FTP obtains the directory.

insert image description here

Then click OK in the upper right corner, the server is set up, and start adding users:

insert image description here

Several items are required in user settings:
Account, password, directory after logging into the server

insert image description here

After all the settings are completed and saved, you will reach the following interface. Click start to start the server.

insert image description here

After successful startup, the following message box is displayed:
Here is the establishment of FTP and SFTP

insert image description here

Next, test it using an FTP client:

insert image description here

For FTP, the connection settings are as follows:

insert image description here

The connection settings for SFTP are as follows

insert image description here

FTP connection successful:

insert image description here

insert image description here

In this way, a server that supports both FTP and SFTP is successfully established. Since the virtual machine is bridged with the physical machine, other computers connected to the LAN can directly access the FTP of the virtual machine.
The message notification on the server side is as follows:

insert image description here

If the settings are incorrect, you can modify the configuration data at any time. After the modification, just stop and restart.

You may also be interested in:
  • How to build SFTP server and image server on Linux cloud server

<<:  The meaning of status code in HTTP protocol

>>:  HTML image img tag_Powernode Java Academy

Recommend

Two simple ways to remove text watermarks from web pages

<br /> When we browse certain websites and s...

Example of how to deploy MySQL 8.0 using Docker

1. Refer to the official website to install docke...

Detailed explanation of the use of MySQL paradigm

1. Paradigm The English name of the paradigm is N...

Code analysis of user variables in mysql query statements

In the previous article, we introduced the MySQL ...

SQL query for users who have placed orders for at least seven consecutive days

Create a table create table order(id varchar(10),...

How to install elasticsearch and kibana in docker

Elasticsearch is very popular now, and many compa...

How to use Vue+ElementUI Tree

The use of Vue+ElementUI Tree is for your referen...

How to set up Windows Server 2019 (with pictures and text)

1. Windows Server 2019 Installation Install Windo...

Example code for implementing simple ListViews effect in html

HTML to achieve simple ListViews effect Result: c...

Vue implements a simple shopping cart example

This article example shares the specific code of ...

Using JS to implement a rotating Christmas tree in HTML

<!DOCTYPE HEML PUBLIC> <html> <hea...

Analysis of centos6 method of deploying kafka project using docker

This article describes how to use docker to deplo...

Using JS to implement a simple calculator

Use JS to complete a simple calculator for your r...

Canvas draws scratch card effect

This article shares the specific code for drawing...

Method of using MySQL system database for performance load diagnosis

A master once said that you should know the datab...