cPanel/WHM FTP upload filesize limit

stefan.ioan

Registered
Mar 17, 2010
2
0
51
Hello, I have been looking for a way to limit the filesize for ftp uploads so as to restrict my users from uploading files larger than 50 MB.

Does anyone know if there is a built-in option or another way to do this ?

I have searched the forum and used google to find the answer to this question and haven't been able to find an answer, most information I found refers to File Manager restrictions not FTP uploads.

Thanks,
Stefan
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
You can throw the -n flag at startup to set limits for all logins or use the limits.conf config to set limits for each individual account in pure-ftpd.

There are ways around both of those though so I usually like to enable the upload script function and have it call a script to double check items.
 

stefan.ioan

Registered
Mar 17, 2010
2
0
51
I have found that for ProFTPd one can set this option in it's configuration:

18. How can I limit the size of uploaded files?

As of 1.2.7rc1 there are two new directives MaxRetrieveFileSize and MaxStoreFileSize to control the maximum size of files being transfered to or from the server.

This was taken from: Configuration problems

Please point me to the file I need to modify/add this option.

Thank you
Stefan
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
You can add these directives to the ProFTPd configuration by logging into the shell as root, using an editor like vi or nano to edit /etc/proftpd.conf, and adding the directives with their desired values. Save the changes to the file, and restart the proftpd service:

Code:
# /scripts/restartsrv_proftpd
The directives you mentioned are not listed in the /etc/proftpd.conf file by default, so you will need to add them.