Troubleshoot - by Hostrare
Here we have some steps to check cpanel FTP connection-related issues in your server. Most of the difficulties will happen in your IPTABLES or CSF firewall settings. Any way first you should verify your FTP is flowing fine.
Use the following command in your cpanel server to verify FTP is listen.
root@server1 [~]# ftp localhost
If the response is as follows, the issue may be related to the configuration of your Firewall.
Trying ::1...
Connected to localhost (::1).
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 12:16. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:root):
If you get a response like “ftp:connect: Connection refused” it means your FTP service is not running or maybe running, but the method has failed. Anyway, try to restart your FTP service or check your FTP port 21 is listening.
To verify that pure-ftpd is running and the server is listening on port 21.
root@server1 [~]# service pure-ftpd status
pure-ftpd (pid 1784) is running...
+------+---------+-------+------+-------------------------------------------+
| PID | Login |For/Spd| What | File/IP |
+------+---------+-------+------+-------------------------------------------+
| 1391 | ? | 00:10 | IDLE | |
| '' | '' | '' | '' | -> localhost |
+------+---------+-------+------+-------------------------------------------+
or
root@server1 [~]# lsof -i tcp:21
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ftp 1390 root 3u IPv6 13784077 0t0 TCP localhost:42432->localhost:ftp (ESTABLISHED)
pure-ftpd 1391 root 4u IPv4 9809 0t0 TCP *:ftp (LISTEN)
This is the various common server-side issue with pure-ftpd. If this procedure did not fix the issue, you can view the log to find another possible reason for the loser. You can view your server’s error logs by running the following command:
root@server1 [~]# tail -f /var/log/messages | grep pure-ftpd
Stop your firewall and check FTP whether its working.
service iptables stop
CSF
/etc/init.d/csf stop
If you are using Pure-FTPd, which is the default, you can define the passive-mode port range by editing /etc/pure-ftpd.conf and uncomment the following directive:
Code:
# Port range for passive connections replies. - for fire walling.
# PassivePortRange 30000 50000
Once you have removed the hash mark (#) from the line starting with “PassivePortRange“, restart Pure-FTPd and edit your firewall configuration to allow traffic on the related port range.
our suuport team here for you 24/7
+8801977507015support@hostrare.comsend a leter Whether you are looking for a personal website hosting plan or a business website hosting plan, We are the perfect solution for you. Our powerful website hosting services will not only help you achieve your overall website goals, but will also provide you with the confidence you need in knowing that you are partnered with a reliable and secure website hosting platform.