Vsftpd installs configuration

  
on SuSE Linux operating system

When installing and configuring FTP on Suse these two days, I have encountered many problems. Here is a summary:

I. Installation

Suse's graphical user interface does a very good job, so the installation process is relatively simple.

1. Open Yast, Software→Software Management;

2. It is very uncomfortable to use Suse's software manager. I can't find the information I need, but use it. After a period of time, it feels more convenient to classify it, and also provides users with more information. In Filter→Package Groups, in the tree list below, Productivity→Networking→Ftp, you can also expand the Ftp node and select the Servers node;

3. Select vsftpd in the package list on the left. Then click the Accept button below, you will be prompted to insert the disc;

4, after inserting the required disc, the system will automatically start the installation, the installation is complete, you can view all related vsftpd in the File List tab page below file.

Second, start the service

After the installation is complete, vsftpd is started as an independent service, does not accept the management of xinetd. The system will automatically add the service named vsftpd to the Service list. The steps to start the service are as follows:

1. Yast→System→System Services(Run level);

2. Select vsftpd in the service list, click the Enable button below to start the service, Finish .

Note that you may not be able to start when you start vsftpd, sometimes because the service it depends on is not started, such as syslog, then select syslog and click the Enable button. If you still can't start, you can restart the xinetd service and then start the vsftpd service.

Third, encountered problems

1, only allow anonymous users to log in
Phenomenon: ftp connection process, prompt to enter the user name, enter the machine has the user name angel, get Hint: 530 This FTP server is anonymous only, the login failed.

Cause: After installing vsftpd, it defaults to an anonymous FTP server, allowing only anonymous users to log in.

Solution: vsftpd has three server modes: anonymous mode, local mode and virtual user mode. Here you need to modify the configuration of vsftpd to set it to local mode. The configuration file for vsftpd is located in the /etc/directory and is named vsftpd.conf. There are already a lot of experts on the Internet who have done a detailed analysis and explanation on the Internet, and the comments inside the file are also more detailed, and will not be explained one by one here. The following only describes a few places that need to be modified:

Remove the # before the local_enable=YES, make it available, indicating that the local user is allowed to log in; add the listen_port=21 configuration item, set the listening port to 21; Optionally, anonymous users are not allowed to log in. Change the value of anonymous_enable=YES to NO and set it according to actual needs.

Restart the vsftpd service: service vsftpd restart. After startup, the test is performed, and the local user angel and its password are used to log in successfully. Note: The above test was performed on this machine (or after logging in using SSH).

2, other machines can not connect to the server

Phenomenon: After the machine passes the test, connect to the server on other machines (Windows or Redhat) using ftp 192.168.1.8, get Connection closed by The remote host or Connection timed out prompt message, the connection failed.

Cause: Suse's firewall blocked access from external machines to the ports used by FTP.

Solution: Release the restrictions on the 20 and 21 ports used by the firewall for FTP. The steps are as follows:
i> Yast→Security and Users→Firewall;ii> Select Allowed in the list on the left. Services, except that even if you install an FTP server, there is no FTP service to choose from in the Servces to Allow list, but SSH, HTTP, HTTPS, Samba, etc. are all listed, so use advanced settings. Click the Advanced button in the lower right method to open the Advanced Settings dialog; iii> Enter 20 21 in TCP Ports, note that spaces are separated between the two port numbers, OK; iv> Next→Accept, retest, successful connection, use The existing angel and its password in the Suse system are successfully registered.

Note that although some of the problems encountered here are encountered under Suse, they are still applicable in the configuration of vsftpd in other operating systems.

Copyright © Windows knowledge All Rights Reserved