A frustrating FTP pattern: the client connects and authenticates fine, shows the directory listing, then every upload stalls at 0%, fails, or times out. Login uses one connection; transfers and listings use a second data connection, and that second channel is what usually breaks — passive-mode ports blocked at the firewall, an FTPS/TLS mismatch, or a NAT/IP confusion between the client and server. The fix is to get the data channel working, which on cPanel almost always means the passive port range and the firewall, not the login itself.
What’s happening
FTP uses two channels. The control connection (port 21) carries login and commands; the data connection carries directory listings and file contents. In passive mode (what modern clients use), the server tells the client a high-numbered port to open the data connection on. If that passive port range is not open in the firewall, the control connection succeeds (you log in) but the data connection cannot establish — so listings hang and uploads time out. This is the single most common “FTP connects but won’t transfer” on cPanel.
The other recurring causes: FTPS (FTP over TLS) misconfiguration — the client demands explicit TLS and the server’s cert or TLS settings reject it, or the client uses plain FTP where the server requires TLS; firewall/CSF blocking either port 21 or the passive range; a NAT mismatch where the server advertises a private IP for the passive connection; disk full or over quota, which lets you connect but fails the write; and wrong permissions/ownership on the target directory (a write the FTP user is not allowed to make). cPanel’s FTP daemon is usually Pure-FTPd or ProFTPD, and the passive range plus the firewall must agree.
How to verify
Confirm which FTP daemon is running and what passive range it uses, then check the firewall.
# Which FTP server, and is it running?
/scripts/restartsrv_ftpd --status
grep -i 'PassivePortRange\|PassivePorts' /etc/pure-ftpd.conf /etc/proftpd.conf 2>/dev/null
# Is the FTP server listening on 21?
netstat -tlnp | grep ':21'
Test the passive data channel from outside and check the firewall lets the range through.
# Verbose FTP shows exactly where it stalls (login OK, data hangs)
curl -v ftp://<ftpuser>@example.com/ 2>&1 | tail -30
# CSF must allow port 21 AND the passive range in TCP_IN
grep -E 'TCP_IN' /etc/csf/csf.conf
csf -g 21
Rule out disk/quota and target permissions, which fail the write rather than the connection.
# Is the account out of disk or over quota?
quota -u <cpaneluser>
df -h /home
# Can the FTP user write to the target directory?
ls -la /home/<cpaneluser>/public_html/
Check the FTP daemon log for the actual refusal:
tail -40 /var/log/messages | grep -i 'ftp\|pure-ftpd\|proftpd'
The fix
- Open the passive port range in the firewall — the top cause. Find the daemon’s passive range (
PassivePortRangeinpure-ftpd.conf, e.g.30000 35000) and add that exact range toTCP_INin/etc/csf/csf.conf, thencsf -r. With the range open, listings and uploads start working immediately. If no range is set, define one and restart the FTP service so it is predictable to firewall. - Switch the client to passive mode — if the client is set to active mode, the server tries to open a connection back to the client, which client-side firewalls and NAT almost always block. Set the client to passive (PASV) mode; this is correct for nearly every cPanel setup.
- Fix the FTPS/TLS mismatch — if the client requires explicit TLS, ensure the FTP service has a valid certificate (cPanel can use the hostname’s AutoSSL cert) and that TLS is enabled in the daemon config. If you do not need TLS for a quick transfer, set the client to plain FTP only if the server permits it — but prefer fixing TLS, since plain FTP sends credentials in the clear.
- Correct a NAT/passive IP mismatch — on a server behind NAT, the FTP daemon may advertise a private IP for the passive connection, which the client cannot reach. Set the daemon’s masquerade/public address (
MasqueradeAddressin Pure-FTPd,MasqueradeAddressin ProFTPD) to the server’s public IP and restart. - Clear a full disk or quota —
quota/dfshows the account or/homefull. Uploads fail mid-transfer even though login works. Free space or raise the quota (WHM » Modify an Account), then retry. A disk-full FTP failure looks exactly like a network failure from the client side. - Fix target directory permissions — the FTP user cannot write to the destination. Confirm ownership is the cPanel user and the directory is
0755(see the permissions runbook). An upload into aroot-owned folder fails the write while the listing still shows. - Prefer SFTP where possible — SFTP runs over SSH (port 22) with a single connection and no passive-port complexity, sidestepping the entire data-channel problem. If the account has shell/SFTP access, point the client at SFTP; it is both simpler and encrypted.
Once the passive range and firewall agree and the target is writable, upload a small test file and confirm it lands with ls -la showing the cPanel user as owner — a completed transfer plus a clean FTP log is the proof, not just a successful login. Stack Harbor handles cPanel FTP and transfer-path triage under cPanel/WHM management — start a conversation.