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

Example of using CASE WHEN in MySQL sorting

Preface In a previous project, the CASE WHEN sort...

MySQL 5.7.18 installation tutorial under Windows

This article explains how to install MySQL from a...

HTML+CSS to achieve responsive card hover effect

Table of contents accomplish: Summarize: Not much...

Write a publish-subscribe model with JS

Table of contents 1. Scene introduction 2 Code Op...

Quickly get started with VUE 3 teleport components and usage syntax

Table of contents 1. Introduction to teleport 1.1...

How to enable or disable SSH for a specific user or user group in Linux

Due to your company standards, you may only allow...

Recommend some useful learning materials for newbies in web design

Many people also asked me what books I read when ...

Docker custom network implementation

Table of contents 1. Customize the network to rea...

How to add website icon?

The first step is to prepare an icon making softwa...

Example method of deploying react project on nginx

Test project: react-demo Clone your react-demo pr...

Using Docker Enterprise Edition to build your own private registry server

Docker is really cool, especially because it'...

A Brief Analysis of CSS Selector Grouping

Selector Grouping Suppose you want both the h2 el...

SQL implementation of LeetCode (178. Score ranking)

[LeetCode] 178.Rank Scores Write a SQL query to r...