FTP Further Info & Troubleshooting
====================================================================================
Passive Port Range
Passive ports are used to allow multiple FTP connctions connections by moving open FTP connections from port 21 to a port specified in the passive port range (40,000-40,100 is the standard UKFastANS passive port range ). See relevant panel/cli doc pages for specific info on how the passive port range can be set.
Calculating FTP that's being used for connection:
A telltale sign of FTP port issues is encountering a connection refused error when the FTP connection attempt enters passive mode. Typically this error will be outputted as follows:
====================================================================================Checking/Changing Passive Ports:
CommonWe Passivecan use the numbers included in the error to calculate the port which the FTP Error:
Canhas connectattempted butto can't retrieve directory listing: use.
80,244,185,220,156,149
First 4 numbers are the server IP,
Multiply 5th number by 256 = x
X+6th number = passive port which is being used
156x256=39936+149=40085
------------------------------------------------------------------------------------------------------------------------------------------------
none-panelled:
------------------------------------------------------------------------------------------------------------------------------------------------
cPanel:
cPanel will use either ProFTP or PureFTP:
PureFTP:
/var/cpanel/conf/pureftpd/local
Once updated, the FTP service needs to be restarted with the following command:
/usr/local/cpanel/scripts/setupftpserver pure-ftpd --force
ProFTP:
------------------------------------------------------------------------------------------------------------------------------------------------
Plesk:
Check in /etc/proftpd.d/passive ports folder