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.

ProFTP – Fatal: error processing configuration file ‘/etc/proftpd.conf’

Error:

telnet 216.55.131.xx 21
Trying 216.55.131.xx…
Connected to 216-55-131-xx.dedicated.domain.net (216.55.131.95).
Escape character is ‘^]’.
216-55-131-xx.dedicated.domain.net proftpd[20885]: error: no valid servers configured
216-55-131-95.dedicated.domain.net proftpd[20885]: Fatal: error processing configuration file ‘/etc/proftpd.conf’
Connection closed by foreign host.

Simply run:

hostname yourservername.tld

or

nano /etc/hosts

Add

127.0.0.1 216-55-131-95.dedicated.domain.net

Restart ftp

service xinetd restart
Categories FTP

FTP login failed – 530 login incorrect

Cannot login via ftp to the domain, the following error is displayed during the logging:

530 Login incorrect.

In the ‘/var/log/secure’ file you may find the following error:

Oct 1 12:55:15 web02 proftpd[20205]: 127.0.0.1 (91.204.25.4[91.204.25.4]) – USER test (Login failed): Invalid shell: ‘/bin/false’

Cause

The string ‘/bin/false’ is missed in the file ‘/etc/shells’.
Resolution

Add ‘/bin/false’ to the ‘/etc/shells’ file
Search words:
FTP
Invalid shell
530 Login incorrect
Error 530
ftp error plesk

Categories FTP