Cannot FTP to Web Host or Server running cPanel/WHM
If you cannot cannot to FTP server or cannot FTP to the web host managed by cPanel/WHM (WebHost Manager), most like the FTP connection fails because the FTP server is not running on the server. There are a few troubleshooting steps that can be taken to verify this problem.
- Log into your server using SSH.
- At the command line shell, type su - or su – root to have root access, if your server forbids direct login by root.
- Run the following command:
ftp localhost
- You will likely see the following fail message:
ftp:connect:Connection refused
This most likely mean that FTP server is not running, or the process has stalled and hanged. In this case, try to restart FTP server. WHM’s Restart Services section has the GUI restart button to easily restart FTP service. Beside, ensure that ftpd service is not disabled in Service Manager.
If you manage to see login prompt and the FTP command connected to localhost(127.0.0.1), the unable to FTP error may be due to the firewall setting or IPTABLES configuration. If you recently made any changes to firewall, undo them to see if problem persists.
- You can also manually check if FTP server is running or not, and which port it’s listening to. In typical cPanel environment, normally the Pure-FTPd is installed as FTP server. So to check if Pure-FTPd is running, issue the following command:
service pure-ftpd status
You should see something like below if FTP server is running:
pure-ftpd (pid 3302) is running...
+------+---------+-------+------+--------------
| PID | Login |For/Spd| What | File/IP |
+------+---------+-------+------+--------------
- To verify which port Pure-FTPd is listening to, type following command. Normally FTP server should listen to port 21.
lsof-i tcp:21
You should see something similar to the following text:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
pure-ftpd 3302 root 4u IPv4 574378144 TCP *:ftp (LISTEN)
- If the remote FTP connection fails problem still exists, try to check the error for any hint on possible cause. To check the errors log for all message related to FTP, use following commands:
less /var/log/messages | grep pure-ftpd
- You can now try to troubleshoot the errors, if any, that mentioned in the log file.
Related Articles
- How to Change Hostname in cPanel Web Host
- Restore Full Backup or cpmove File in cPanel Web Host
- How to Check if Telnet Is Running on a Server
- cPanel Update (upcp) Is Already Running Problem
- Auto Delete Forwarded Emails in cPanel Web Host
- How to Add IP Addresses to Server with cPanel WebHost Manager (WHM)
- How to Restart (Stop or Start) cPanel Service (cpsrvd) via Telnet or SSH
- Download Key Management Service (KMS Host) for Windows Server 2003
- Cannot Display the Webpage and Host/Server Not Found or Available Error – EnablePMTUDiscovery MTU Fix
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager










































March 28th, 2009 01:48
I find that the majority of the time the issue is really the firewall. When brute forces are detected and locked out the account is locked and IP is placed on the firewall block list. Often, that IP needs to be manually removed to enable FTP access. I’ve found this being very common in hosting servers. So… don’t forget to check the firewall too!
January 22nd, 2008 14:45
Great. this helped me out. The only problem is, I have to reboot the FTP service after every system reboot. Is this normal? Why isn’t the FTP service starting automatically?