ftp Proftpd error

Error when ftp to a domain

DS28220.domain.com proftpd[16643]: error: no valid servers configured
DS28220.domain.com proftpd[16643]: Fatal: error processing configuration file ‘/etc/proftpd.conf’

Edit the /etc hosts file and put the IP and the name in it:


Nano /etc/hosts
DS28220.domain.com 129.33.44.55

Restart xinetd

service xinetd restart

FTP error – ECONNREFUSED – Connection refused by server-Proftp

When connecting to the server via ftp and you are sure about the credentials and the firewall rules and iptables. Check DNS and the proftpd.conf file:

# dig domain.com
domain.com.       21599   IN      A       216.xx.xx.xx


# nano /etc/proftpd.conf
Port                            21
MasqueradeAddress       216.xx.xx.xx
PassivePorts                    60000 65000

Check the MasqueradeAddress feature and see if matched your IP for the domain you are connecting to.

Also – if behind a firewall…

Create a VirtualHost for 216.xx.xx.xx with the following configuration:


<VirtualHost 192.168.0.5>
ServerName "ProFTPD"
MasqueradeAddress 216.xx.xx.xx
PassivePorts 60000 65000
</VirtualHost>

public_html directory not showing in ftp

A user could not show the public_html directory on a cpanel server. Run the following to see how many files are listed in the directory.

cd /home/username
ls|wc -l
10050

This folder has 10500 files. The settings for ftp do not allow a full directory listing. We removed the files that were not needed and ftp worked.

Also this is a setting in /etc/pure-ftpd.conf

nano /etc/pure-ftpd.conf
# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion 10000 8

To change this – change the line amount in the first number and restart ftp

LimitRecursion 11000 8
service pure-ftpd restart

To change the ftp maximum number of files on plesk.

nano /etc/proftpd.conf
ListOptions -a maxfiles 2000 maxdepth 3

Restart xinetd

 service xinetd restart

This configures the -a option by default, and limits the maximum files in the generated listing to 2000. If the client uses the -R option, proftpd will not recurse into directories more than 3 levels deep when generating the listing.