How to Change Recursion Limit (File Limit List) in PureFTPd on cPanel

By default, PureFTP server on cPanel has a limit on a number of files displayed through an ftp client. It is usualy 10000, if you need more files displayed follow this quick tutorial.

Ftp is easy to configure on a cPanel server using WHM or the pureFTP configuration file. The FTP service configuration in WHM is a no-brainer, but for those looking to set up FTP from command line (such as for automation purposes), you can use cPanel’s built-in template system to apply configuration options that will not be overwritten during cPanel updates.

The PureFTP template is located in /var/cpanel/conf/pureftpd/main, and is set up YAML style similar to most of cPanel’s internal configuration files. The settings in the template correlate directly to the same options in /etc/pure-ftpd.conf, but it’s better to edit the template since cPanel tends to prefer template-based configuration to regenerate (overwrite) config files.

So let’s change an option in the FTP configuration. I’m going to change the LimitRecursion value from 10000 to 40000, which will allow the FTP server to display more than 10000 files in a single folder. To do this, I’ll edit the value in the template file:

nano /var/cpanel/conf/pureftpd/local

Insert the following code, and save:

LimitRecursion 40000 20

40000 represents the number of files displayed and 20 number of subdirectories.

Then apply the changes using one of the WHM binaries invoked from command line:

/usr/local/cpanel/whostmgr/bin/whostmgr2 doftpconfiguration

Source: