Configure an FTP server with FileZilla

When copying large files, sometimes the copying fails due to Windows system limitations, and FTP Server can solve the problem of file transfer. FileZilla is a good free tool, and the version is not mandatory. FileZilla supports file transfer protocols such as FTP , FTPS , and S FTP . Official website download address: Download-FileZilla Chinese website FileZilla is a fast and reliable FTP client and server-side open source program with a variety of features and intuitive interfaces. Controllability, an organized interface and a simplified way of managing multiple sites make Filezilla Client Edition a convenient and efficient FTP client tool. https://www.filezilla.cn/download

Table of contents

build environment

Server side installation​​​​​​

 FileZilla connects to local server

View and edit configuration information

 Rights management Rights management​​​​​​​​

 Server Listeners

Passive mode Passive mode

 firewall configuration

user login

Clear saved FTP user records

 Issue

client installation

Use the client to connect to the server 

 


build environment

 FileZilla is divided into server and client. The server used in this article is WindowsServer2019 system, and the client uses Win10 system. The versions of FileZilla used are: server : FileZilla_Server_1.5.0_win64, client: FileZilla_3.60.1_win64. ​​​​​​​​ 

Server side installation​​​​​​

  1. Run "FileZilla_Server" as administrator to follow the package. "I Agree".
  2. Select the components to be installed, the default is fine, and the next step is "Next".
  3. Select the installation location, and you can choose whether to change it according to your needs. "Next".
  4. By default, "Next".
  5. Installed as a service by default, started from Windows. Listens on port 14148 by default. Configure the FileZilla administrator password (can be empty). "Next". If you do not configure a password, there will be a pop-up window reminder, select "Yes".
  6. By default it starts after the logged in user. "Install".
  7. Certificate.
  8. The installation is complete, "Close".

 FileZilla connects to local server

  1.  After the installation is complete, there are 3 shortcuts on the desktop, double-click "AdministerFileZillaServer" to open.
  2. Click "Connect to FileZilla FTP Server" in the window.
  3. By default, the loopback address is used, and the password is optional. It is recommended to check Save password and Automatic connection. 
  4. Here is the string on the certificate, Yes. 
  5. connection succeeded. You can see the words Successfully connected in the log information.

View and edit configuration information

Click Server >> Configure… to open the configuration window.


 Rights management Rights management

The default system account for accessing the file system. Set which account the client uses on the server to access files. The permissions of this account affect the operation permissions of the user when accessing.

If you select use other system user and the account filled in is not created on the server, the user cannot log in.

By default, the SYSTEM account of the server you are connecting to is used.

Configuration group

The users in the group have unified authority, and the authority of the group is greater than that of the user.

For example: Group has the read-only permission of the folder C:\FzTest, and does not apply to subdirectories, and the user test has the read-write permission of the C:\FzTest\test folder. After user test is added to the group Group, user test has the same permissions as Group, and has no permission to open subfolders under the C:\FzTest directory.

Configure user Users

Click add to add user, modify user name to 2, set password, add path, and set access rights.

        Virtual path represents the virtual path, which is the access path seen by the client, and "/" is used by default;

        The local file path represented by Native path, such as c\test\2.

Filters, IP filtering, set disallowed ip addresses and allowed ip addresses.

Speed ​​Limits, rate limit.

 Groups are not recommended unless you are using public folders. Just configuring users is enough to use as an FTP server.


  •  Server Listeners

Set the ip and port number of the ftp connection, "::" means localhost. (default)

During the experiment, the client can access the first line address when it is 0.0.0.0, and the client cannot access it when it is 127.0.0.1.

  •  Protocols setting
  1. Autoban automatically bans. After several failed logins, the ip is banned, and the default is 300 seconds. 0 times means not enabled.
  2. ​​​​​​​​​​​​​​Timeouts, login timeout, the default is 60 seconds.
  3. Performance, the number of threads, the maximum number of connections.
  4. Filters, IP filtering, set to allow access to IP ranges, and deny IP ranges.
  • FTP and FTP over TLS(FTPS) 
  1. Connection Security connection security, set the minimum TLS version. TLS certificate settings, use self-signed certificate by default.
  2. Welcome message, customized welcome message. The command line login is visible. 

Passive mode Passive mode

Passive mode Passive mode, configure the port and IP, choose whether to use it according to your own situation. Release port 49152-65534 in the firewall (add inbound rule port).

 

  •  ​​​​​​​Administration
  1. Connection, connection, local listening port defaults to 14148. This page can be left as default.
  2. Connection security, connection security. The default minimum TLS version is 1.3, use a self-signed certificate, the default is fine.
  • Logging

log settings. Can be adjusted according to the situation.

  • Encryption certificate

 


 firewall configuration

The FTP protocol uses two ports 20 and 21 in the TCP port, 20 is used to transmit data, and 21 is used to transmit control information.

In FileZilla, the SFTP protocol connects to the server using port 22, and the FTP connects to the server using port 21, where port 20 is the port used for actual transmission, and port 21 is only used for FTP login authentication.

Ports in passive mode can also be configured in the firewall as described in the following steps.

  1. Open the firewall and click Advanced Settings. Click Push Rules > New Rule > Next.  ​​​​​​​​
  2. Select port > Next, select TCP, specify port: 20, 21, 22 > Next.
  3. Allow connection >Next, Next. ​​​​​​​​
  4. Naming rules, click finish to complete the creation. New rules can be seen in the firewall.

user login

Open the resource manager, enter  ftp ://(FTP server address), and press Enter to access.

 Optionally save passwords. If the password is saved, the saved user will be logged in automatically at the next login.

Clear saved FTP user records

Execute the command under CMD: reg delete HKEY_CURRENT_USER\Software\Microsoft\FTP /f

 


 Issue

Some problems encountered.

1. When the client is logged in, it has been unable to log in, and there is no error pop-up window. On the server side, it is viewed as Failed to connect to the data socket, and the connection timed out. In passive mode, the connection is successful after deleting the Use  the  following  host  information. 

 Remove use the following host in passive mode.

2. The client reports an error when logging in, 200, 227, 550. The server has the same log information.

FTP has two working modes, PORT  active mode and PASV passive mode.

2 27 error needs to close the passive mode of the client, or configure the passive mode of the server.

The 550 error may be a problem with the path, just delete the path and reconfigure.

 

 3. The client reports error 550 and cannot open the file or directory. Back to normal after re-adding the user path.

4. When using the Windows Server 2012R2 system to open the FTP folder and drag files to the local area, it prompts: Your current security settings do not allow downloading files from this location. Double-click the installation package in the FTP folder to prompt: Such a port is not supported.

 

 There is no such phenomenon on Win10 system. And it doesn't work after turning off the firewall. Later, I found that I need to set trusted sites in the Internet options.


client installation

 

 

Use the client to connect to the server 

  1. There is a site manager under the file function, which is used to log in to the server.
  2. Create new site > modify site name > input host ip > protocol port (FTP—21; SFTP—22) > FTP user, password > connect. After clicking the connection, there will be two pop-up windows, one is whether to remember the password, and the other is the certificate, click OK.
  3. After the connection is successful, you can see the status log in the status window and the directory information in the remote directory window.
  4. Under the server function, you can perform Reconnect and Disconnect operations. There is also the function of searching remote files.

 

 

Guess you like

Origin blog.csdn.net/weixin_57050763/article/details/127578373