[SOLVED] How i could restrict the the download file size?
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How i could restrict the the downloads file size?
I mean, i don't want restrict the download speed but when the downloads exced x size, i need stop it. What can i do for?
Sorry, i can't get in this site, i live in cuba, i would like to use fully linux on my job but i haven't acced to all the world page...
maybe if you could help with i would thanks so much... and yes is about squid
These are the contents from the link I mentioned in previous post, the original rights liaise with the author:
Code:
By specifying the maximum allowed size as "reply_body_max_size", Squid can prevent users downloading large files. For example prevent users downloading files larger than 50MB.
So when a replay body comes the "reply_body_max_size" parameter checks and deny if file size is larger than 50MB.
Add the below acl configurations to squid configuration file
[root@server ~#]vi /etc/squid/squid.conf
#First create an acl
acl limited_users src 192.168.0.0/24
#Deny downloading larger than 50MB for above acl
reply_body_max_size 50 MB limited_users
Reload squid service
[root@server ~#]service squid reload
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.