How to Increase FTP Visible File Limits on PureFTP

In this tutorial, we can check how to increase FTP Visible File Limits.

By default, the PureFTP server on the cPanel set a limit to the number of files displayed through an FTP client. It is usually 10000, if you wish to view more than 10000 files through your FTP server, then you can follow up this quick tutorial.

When we are working for a website that is hosted on a hosting account organization is very important. It is good to have files separated among folders, so they are all related to one another and easy to identify. There is no limit for the number of files that existed on a folder, but there is a limit to the number of files that will be displayed via FTP account. This means that if the limit is set to 10000, for example, then any files after the 10000th file will not show, despite them existing on the server.

How to Increase FTP Visible File Limits on PureFTP
How to Increase FTP Visible File Limits on PureFTP

Step For increase FTP Visible File Limits: #

1) Login to the server via SSH using the root user.

2) Go to etc folder.

Code
# cd /etc

3) Open pure-ftpd.conf file using your favorite editor.

Code
# vi pure-ftpd.conf

4) Locate ‘LimitRecursion’ on the configuration file. Below is the sample of this line.

Code
# ‘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

The first number indicates the total number of files display on the FTP while the second is the max depth of the subdirectories. You would need to increase the first number to increase the number of files displayed in an FTP client. So, after you change the file the settings look like this:

Code

# ‘ls’ recursion limits. The first argument is the maximum number of

# files to be displayed. The second one is the max subdirectories depth

LimitRecursion 20000 8

5) After editing this configuration file, you would need to save and quit the file and restart the ftp service for the new configuration to take effect using the below command.

Code
# service pure-ftpd restart

6) But editing the configuration file may get overwritten on next cPanel update. If you apply these configuration changes on cPanel’s built-in template system, that will not be overwritten during cPanel updates. PureFTP templates are located in /var/cpanel/conf/pureftpd/main, you can edit the template file using the below command.

Code
# nano -w /var/cpanel/conf/pureftpd/main

7) Locate ‘LimitRecursion’ on configuration file. You will see something like:

Code
LimitRecursion 10000 8

8) You need to change it to the following:

Code
LimitRecursion 20000 8

Save the file after modification, and then apply the changes using one of the WHM binaries invoked from the command line:

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

You are done!! now your FTP client will display files up to 20000th file.

If you wish to create a standard template for PureFTP and download it directly to your server use the following command.

Code
# wget -O /var/cpanel/conf/pureftp/main http://yourrepo/pureftp/main /usr/local/cpanel/whostmgr/bin/whostmgr2 doftpconfiguration

 

Source: interserver

Powered by BetterDocs