Knowledgebase

Max FTP upload file size

Posted by kandyjet, 06-11-2015, 01:08 AM
Hello, linux / apache Any way to restrict the max file upload size in FTP? Coz some clients are uploading movies and iso images thinking this is unlimited. They do not read the policy even. when i contacted our upstream provider, they sad

Posted by Johnny Cache, 06-11-2015, 01:25 AM
Standard LAMP with user accounts (mod_userdir)? Regular "average Joe" file server? No cPanel or other user interface? If you're on an OpenVZ VPS, your provider can configure second level (user and group) quotas using "--quotaugidlimit" but this requires access to the node. If you're running a dedicated server or a KVM you can use good old fashioned quotas (http://www.firewall.cx/linux-knowled...em-quotas.html or https://access.redhat.com/documentat...sk-quotas.html)

Posted by kandyjet, 06-11-2015, 01:33 AM
Thank you for the comment. we have VPS with CENTOS 6.6 x86_64 virtuozzo – host WHM 11.48.4 (build 4)

Posted by Johnny Cache, 06-11-2015, 02:00 AM
If your provider has correctly set the second level quotas you should see the symbolic link to the quota files on the Virtuozzo node: If you don't see this, talk to your provider about enabling second level quotas on your VPS. Most times you won't even need to reboot. If you do see a similar output to the above, you can try these: Followed by This should at least enforce your cPanel user accounts a little better when it comes to managing their disk usage. Otherwise if too much disk space is being consumed you may need to rethink the whole "unlimited" thing or rework your TOS a little better.

Posted by kandyjet, 06-11-2015, 02:51 AM
Thanks jetfi, ill check all your suggssions shortly and come back with the results. Thank you again.

Posted by kandyjet, 06-17-2015, 08:43 AM
Hi buddy, just heard this form our provider

Posted by kandyjet, 06-17-2015, 09:20 AM
further stated

Posted by techs4gnu, 06-17-2015, 09:51 AM
Hi I am not sure if this will be working, but you can try the solutions mentioned in this WHT thread http://www.webhostingtalk.com/showthread.php?t=874005

Posted by Srv24x7, 06-17-2015, 10:02 AM
Hi, Try the following and see if it helps: However, this may be applied to the main cPanel user though, but not applied to the virtual FTP accounts created by pure-ftpd: Below is the example to limit filr size that is uploaded by a user to 1 GB: vi /etc/security/limits.conf ------ Add the below entry ------ username hard fsize 1024000

Posted by JustinAY, 06-17-2015, 10:22 AM
You could switch to proftpd and use MaxStoreFileSize. You can do this via your WHM panel. Please note that you should be setting quotas for your cPanel accounts as well. Loading .iso's, etc should not really be an issue that would affect the server itself immediately.

Posted by Bbnuse, 06-18-2015, 01:49 AM
If you're running Proftpd, then try directives like MaxRetrieveFileSize and MaxStoreFileSize (they must be added to /etc/proftpd.conf). If your server runs Pure-ftpd, then use the suggested limits.conf file.

Posted by kandyjet, 06-18-2015, 06:13 AM
Thanks guy for your suggestions. il talk to my provider by showing these options.

Posted by kandyjet, 06-18-2015, 06:26 AM
Hi justingAY You mean, we have cpanel clients using 3 packages and they have quota limits. so is this you mean ?

Posted by kandyjet, 06-18-2015, 06:30 AM
can i set a large number of files like 10000000000 ? coz currently file count is not really considered as a problem.

Posted by techs4gnu, 06-18-2015, 06:44 AM
Hi Yes as per those posts. it should be fine. Let us know if it is working or not

Posted by kandyjet, 06-20-2015, 08:40 AM
Hi techs4gnu, i tried several patterns and tested with a cpanel account and found to be having very strange sideeffects. so i completly commented out again that line for now. tried : Quota 1000000:10 cant upload a 6 MB file tried : Quota 1000000:20 cant upload a 6 MB file tried : Quota 1000000:80 able to upload a 6 mb file So i cant undestand how this pure-ftpd derective is behaving.

Posted by kandyjet, 06-20-2015, 08:41 AM
Hi techs4gnu, i tried several patterns and tested with a cpanel account and found to be having very strange sideeffects. so i completly commented out again that line for now. tried : Quota 1000000:10 cant upload a 6 MB file tried : Quota 1000000:20 cant upload a 6 MB file tried : Quota 1000000:80 able to upload a 6 mb file So i cant undestand how this pure-ftpd derective is behaving.

Posted by techs4gnu, 06-21-2015, 07:50 PM
Hmm.. Not sure why it is not working, May be your host can help you. try setting the same again and then after restart check the process and see if you are able to see the limit in the ftp process running As per the pureftp doc and cpanel forums, the second section is in MB, so settings should be fine. Another option is to change the FTP from pure ftp - proftp and then things will be much easier. http://download.pureftpd.org/pure-ftpd/doc/README ==== Quotas can be enabled for all users for the -n (--quotas) option. This option is followed by the max number of files and the max size (in Megabytes) . Every user will have the same quota. Exception: members of the trusted group, if -a is enabled. You can also have different quotas for every user if you use PureDB or SQL databases. See the "README.Virtual-Users" file for more info about PureDB databases. So, if you want 1000 files max and 10 Mb max for all your customers, run the server like this: /usr/local/sbin/pure-ftpd -n 1000:10 ====== https://forums.cpanel.net/threads/pu...-exceed.29581/

Posted by servermates, 06-23-2015, 04:44 AM
Hello you can either setup an userquota to ftp home directory or you can the values /etc/security/limits.conf



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
how stop spam? (Views: 599)
scp issue (Views: 537)


Language:

Client Login

Email

Password

Remember Me

Search