The system of the virtual machine is centos6.3
The first step. Start FTP
Service VSFTPD Restart
Hint VSFTPD: Unrecognized service
The workaround is to upgrade the VSFTPD service
Yum Install vsftpd
Re-restart the service successfully.
grep +
found that port 21 is indeed in listen listening state
The second step.
Virtual Machine Use commands
Tcpdump-i ETH0-NNX Port 21
21-Port Packet for crawling the first NIC IP, in hexadecimal display
Use commands at the command line of the real machine (192.168.2.102 is the IP of the virtual machine)
FTP 192.168.2.102
Attempt to establish an FTP connection with a virtual machine
found that although the virtual machine can catch the package, but the real machine is not prompted to enter the user name and password, that is, did not connect successfully
The third step is to find the iptables firewall problem.
Servcie iptables Stop
Used to temporarily shut down the firewall
Chkconfig iptables off
For permanently shutting down the firewall
Fourth step. Execute the command in the second step, you need to enter a user name and password.
But then immediately prompt
oops:cannot Change directory:/home/user1 Oops:child died remote host closes the connection.
Troubleshoot the following possible
- Does the directory for the user is trying to login as even exist?
- Check file permissions for the directory being accessed to ensure the directory can is read, but also have execute per Missions.
- Check SELINUX. Might need to disable to get vstftpd to work. Not a ideal situation if you need SELINUX active, but at least you'll know what's the cause of your error is.
Discovery is a problem with the SELinux security module.
The orders and documents relating to SELinux:
To view the SELinux status:
1,/usr/sbin/sestatus-v # #如果SELinux The status parameter is enabled is turned on
SELinux status:enabled
2. Getenforce # #也可以用这个命令检查
To turn off SELinux:
1, temporarily shut down (do not restart the machine):
Setenforce 0 # #设置SELinux become permissive mode
# #setenforce 1 set SELinux to become enforcing mode
2. Modify the configuration file to restart the machine:
Modify the/etc/selinux/config file
Change Selinux=enforcing to Selinux=disabled
Restart the machine
Fifth step. Input successful, login successful
Linux Enable FTP service and connections