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

Vue element implements table adding, deleting and modifying data

This article shares the specific code of vue elem...

Understanding and application of JavaScript ES6 destructuring operator

Table of contents Preface The role of deconstruct...

Detailed example of MySQL exchange partition

Detailed example of MySQL exchange partition Pref...

Detailed explanation of Nginx timeout configuration

I recently used nginx in a project, and used Java...

Implementation of check constraints in MySQL 8.0

Hello everyone, I am Tony, a teacher who only tal...

Detailed installation and use of RocketMQ in Docker

To search for RocketMQ images, you can search on ...

Detailed tutorial on using the tomcat8-maven-plugin plugin in Maven

I searched a lot of articles online but didn'...

Solution to uninstalling Python and yum in CentOs system

Background of the accident: A few days ago, due t...

How to use dl(dt,dd), ul(li), ol(li) in HTML

HTML <dl> Tag #Definition and Usage The <...

MySQL select, insert, update batch operation statement code examples

In projects, batch operation statements are often...

MySQL dual-master (master-master) architecture configuration solution

In enterprises, database high availability has al...