cPanel FTP Connection issues

cPanel FTP Connection issues

Here we have few steps to verify cpanel FTP connection related issues in your server. Most of problems will happen in your IPTABLES or CSF firewall settings. Any way first you should check your FTP is running fine.

Use the following command in your cpanel server to check FTP is listen.

[email protected] [~]# ftp localhost

If the response is as follows, the issue may be related to 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 response like “ftp:connect:Connection refused” it means your FTP service is not running or may be running , but the process 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.

[email protected] [~]# service pure-ftpd status
pure-ftpd (pid 1784) is running...
+------+---------+-------+------+-------------------------------------------+
| PID | Login |For/Spd| What | File/IP |
+------+---------+-------+------+-------------------------------------------+
| 1391 | ? | 00:10 | IDLE | |
| '' | '' | '' | '' | -> localhost |
+------+---------+-------+------+-------------------------------------------+

or

[email protected] [~]# 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)

Run the FTP localhost command again to verify it.

This is the most common server-side issue with pure-ftpd. If this procedure did not resolve the issue, you can view the log to find other possible reasons for the failure. You can view your server’s error logs by running the following command:

[email protected] [~]# tail -f /var/log/messages | grep pure-ftpd

Firewall Status

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:

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution