Page 1 of 1

one day suddenly I can not connect to FTP

Posted: Sun Mar 06, 2016 9:05 am
by baijianpeng
After my VestaCP was set up, my FTP worked fine. Then one day recently it suddenly can not work: I can not connect to FTP. Filezilla shows following log message:
Status: Connecting to 120.27.137.71:21...
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 3.0.2)
Command: AUTH TLS
Error: Could not connect to server
Status: Waiting to retry...
Status: Connecting to 120.27.137.71:21...
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 3.0.2)
Command: AUTH TLS
Error: Could not connect to server
I have no idea what is wrong.

Maybe my server was hacked by someone?

PS: I had read the post about ALL CLI commands of VestaCP, but it seems that there is no one command to "list all ftp users". I am afraid the hacker will create a new FTP user for himself but I can not see it without such a command.

Could someone here help me solve this? Thank you.

Re: one day suddenly I can not connect to FTP

Posted: Sun Mar 06, 2016 9:11 am
by baijianpeng
I checked the conf file of vsftpd, it is:

Code: Select all

[root@ /]# vim /etc/vsftpd/vsftpd.conf

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
dual_log_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
allow_writeable_chroot=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
force_dot_files=YES
ascii_upload_enable=YES
ascii_download_enable=YES
pasv_enable=YES
pasv_max_port=12100
pasv_min_port=12000
pasv_address=120.27.137.71
~                                                                                                               
Hope someone will point out something is wrong.

Thank you.

Re: one day suddenly I can not connect to FTP

Posted: Sun Mar 06, 2016 9:14 am
by baijianpeng
Then I tried to restart the vsftpd service but got "failed" message as following:

Code: Select all

[root@localhost /]# systemctl restart vsftpd
Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.
[root@localhost /]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2016-03-06 17:11:59 CST; 18s ago
  Process: 29667 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)
 Main PID: 6765 (code=killed, signal=TERM)

Mar 06 17:11:59 localhost systemd[1]: Starting Vsftpd ftp daemon...
Mar 06 17:11:59 localhost systemd[1]: vsftpd.service: control process exited, code=exited status=2
Mar 06 17:11:59 localhost systemd[1]: Failed to start Vsftpd ftp daemon.
Mar 06 17:11:59 localhost systemd[1]: Unit vsftpd.service entered failed state.
Mar 06 17:11:59 localhost systemd[1]: vsftpd.service failed.
[root@localhost /]# 
How to solve this? Thank you.

Re: one day suddenly I can not connect to FTP

Posted: Sun Mar 06, 2016 12:35 pm
by baijianpeng
OK, after some googleing, I solved this problem with following code:

add following line of code to the end of vsftpd.conf:

Code: Select all

 ssl_enable=NO
Then vsftpd can be started.

Please mark this topic as "solved".

Thank you.