


How to solve the problems encountered when installing vsftpd in nginx
The simplest installation steps
[root@itdragon ~]# useradd ftpuser [root@itdragon ~]# passwd ftpuser changing password for user ftpuser. new password: bad password: it is too short bad password: is too simple retype new password: passwd: all authentication tokens updated successfully. [root@itdragon ~]# yum -y install vsftpd [root@itdragon ~]# ifconfig
Step 1: Add ftp user
Step 2: Set ftp user password
Step 3: Install vsftpd
Step 4: Check the IP address
Step 5: Use free filezilla locally to link to the virtual machine
Problems encountered
Connection failed
状态: 正在等待重试... 状态: 正在连接 192.168.0.11:21... 错误: 20 秒后无活动,连接超时 错误: 无法连接到服务器
Don’t be discouraged. Installation is not always smooth sailing. Everyone will have different problems based on their own environment. The following is my solution
First of all, make sure that both sides can ping. The virtual machine has selected the bridge mode and can ping normally.
Then, Baidu
There are many various solutions on the Internet, mainly for three aspects
I will post them here Several URLs, because I failed to connect successfully according to the instructions on the website, and finally solved it by turning off the firewall. I am relatively weak in this area, so I won’t mislead others. Posted here to facilitate future modifications.
The first operation is to turn off anonymity and enable passive mode
The second operation is to open port 21 of the firewall
The third operation The first operation is to modify selinux and enable external network access
[root@itdragon ~]# vim /etc/vsftpd/vsftpd.conf anonymous_enable=no pasv_min_port=30000 pasv_max_port=31000 [root@itdragon ~]# service vsftpd restart [root@itdragon ~]# vim /etc/sysconfig/iptables -a input -p tcp -m multiport --dport 20,21 -m state --state new -j accept -a input -p tcp -m state --state new -m tcp --dport 21 -j accept -a input -p tcp --dport 30000:31000 -j accept [root@itdragon ~]# service iptables restart [root@itdragon ~]# getsebool -a | grep ftp allow_ftpd_anon_write --> off allow_ftpd_full_access --> off allow_ftpd_use_cifs --> off allow_ftpd_use_nfs --> off ftp_home_dir --> off ftpd_connect_db --> off ftpd_use_fusefs --> off ftpd_use_passive_mode --> off httpd_enable_ftp_server --> off tftp_anon_write --> off tftp_use_cifs --> off tftp_use_nfs --> off [root@itdragon ~]# setsebool -p allow_ftpd_full_access on [root@itdragon ~]# setsebool -p ftp_home_dir on
Temporarily turning off the firewall is not enough, just turn off the firewall permanently
[root@itdragon modprobe.d]# service iptables stop iptables: setting chains to policy accept: filter [ ok ] iptables: flushing firewall rules: [ ok ] iptables: unloading modules: [ ok ] [root@itdragon modprobe.d]# chkconfig iptables off
Upload failed
In An images folder was created in the nginx installation directory. When uploading images through filezilla, an error message appears.
响应:553 could not create file. 错误: 严重文件传输错误
The solution is as follows
[root@itdragon html]# mkdir images [root@itdragon html]# chmod -r 777 images [root@itdragon html]# ll total 12 -rw-r--r--. 1 root root 537 nov 18 10:53 50x.html drwxrwxrwx. 2 root root 4096 nov 18 10:55 images -rw-r--r--. 1 root root 612 nov 18 10:53 index.html [root@itdragon html]# vim /etc/vsftpd/vsftpd.conf local_root=/var/ftp [root@itdragon html]# service vsftpd restart
Notes
The network must be able to ping.
Firewall issues must be dealt with
Cannot create file issues
The above is the detailed content of How to solve the problems encountered when installing vsftpd in nginx. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to configure an Nginx domain name on a cloud server: Create an A record pointing to the public IP address of the cloud server. Add virtual host blocks in the Nginx configuration file, specifying the listening port, domain name, and website root directory. Restart Nginx to apply the changes. Access the domain name test configuration. Other notes: Install the SSL certificate to enable HTTPS, ensure that the firewall allows port 80 traffic, and wait for DNS resolution to take effect.

Starting an Nginx server requires different steps according to different operating systems: Linux/Unix system: Install the Nginx package (for example, using apt-get or yum). Use systemctl to start an Nginx service (for example, sudo systemctl start nginx). Windows system: Download and install Windows binary files. Start Nginx using the nginx.exe executable (for example, nginx.exe -c conf\nginx.conf). No matter which operating system you use, you can access the server IP

The methods that can query the Nginx version are: use the nginx -v command; view the version directive in the nginx.conf file; open the Nginx error page and view the page title.

You can query the Docker container name by following the steps: List all containers (docker ps). Filter the container list (using the grep command). Gets the container name (located in the "NAMES" column).

To get Nginx to run Apache, you need to: 1. Install Nginx and Apache; 2. Configure the Nginx agent; 3. Start Nginx and Apache; 4. Test the configuration to ensure that you can see Apache content after accessing the domain name. In addition, you need to pay attention to other matters such as port number matching, virtual host configuration, and SSL/TLS settings.

How to confirm whether Nginx is started: 1. Use the command line: systemctl status nginx (Linux/Unix), netstat -ano | findstr 80 (Windows); 2. Check whether port 80 is open; 3. Check the Nginx startup message in the system log; 4. Use third-party tools, such as Nagios, Zabbix, and Icinga.

Steps to create a Docker image: Write a Dockerfile that contains the build instructions. Build the image in the terminal, using the docker build command. Tag the image and assign names and tags using the docker tag command.

Docker container startup steps: Pull the container image: Run "docker pull [mirror name]". Create a container: Use "docker create [options] [mirror name] [commands and parameters]". Start the container: Execute "docker start [Container name or ID]". Check container status: Verify that the container is running with "docker ps".
