Limiting Pure-FTP upload/download speed

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
Hello,

How do I go about limiting how fast a user can upload in Pure-FTP. With big internet pipes these days, users can cause large spikes on my bandwidth and where your getting billed 95th percentile it can be VERY expensive. I want to setup a limit so they can't transfer no faster than 100k per second.
 

ekg

Member
Feb 22, 2008
9
0
51
sorry to bother

Hi

sorry to bother you as this is not an answer to your post but i wonder if you could tell me how you set up pure ftp for one of your accounts and how the customer can use it to start uploading?

I have it running so my WM tells me but i am unsure how i can use it to upload..does tis make sense?

if you can give me any help it would be appriciated
 

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
Anyone please? If anything I just need to limit the FTP uploading speed...
 

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
Hello,

IT appears I cannot get it working. I tried the command.


[email protected][/]# pure-pw usermod [email protected] -T 10 -m
and
[email protected][/]# pure-pw usermod [email protected] -t 10 -m

It seems to have acceptaed and I can see the settings when doing:

pure-pw show [email protected]

Login : [email protected]
Password : $xxxxxxxxxxxxxx
UID : 32030 (user)
GID : 32031 (user)
Directory : /home/user
Full name :
Download bandwidth : 10 Kb (enabled)
Upload bandwidth : 10 Kb (enabled)
Max files : 0 (unlimited)
Max size : 0 Mb (unlimited)
Ratio : 0:0 (unlimited:unlimited)
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :
Time restrictions : 0000-0000 (unlimited)
Max sim sessions : 0 (unlimited)

I restarted FTP server and still I am able to upload/download of over 200KBS per second.

STarting to pull my hair out now.
 
Last edited:

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
Limiting PureFTP uploads

I want to limit all PureFTP uploads on my server to be no more than 50k. How can I do this? I've been pulling my hair out for quite sometime and have had no luck.
 

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
Does anyonej know how to do this? If anyone can help me in getting this to work I will even pay for the help.
 
Last edited:

LiNUxG0d

Well-Known Member
Jun 25, 2003
206
1
168
Gatineau, Quebec, Canada
Hey there,

Generally, I don't think pureftpd faciliates this. I read up on some of the core docs and you can specify max transfer as in quota TOTALS, but not the size...

Example: You can tell pure to allow 100,000 files totalling 120MB.

With regards to quota and max size for transfers, perhaps a PAM module would be required for this specific type of file size gating.

Let me know what you think and in the mean time, if anyone knows of any other things please talk about it. I'm curious. :)

Warmest regards,
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,133
1
168
New York
Does anyonej know how to do this? If anyone can help me in getting this to work I will even pay for the help.
I am pretty sure all you did was edit the pureftp password control file, but if you dont have pure-ftpd compiled
with "--with-throttling" I think it wont work. Does anyone know if pure-ftpd is compiled with that switch in effect ?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
I am pretty sure all you did was edit the pureftp password control file, but if you dont have pure-ftpd compiled
with "--with-throttling" I think it wont work. Does anyone know if pure-ftpd is compiled with that switch in effect ?
According to the SPEC file it is.
 

mm1250

Well-Known Member
Nov 10, 2006
108
0
166
OK GUYS, Well I figured out 1/2 the issue.

I was able to modify the /etc/pure-ftpd.conf file and there is a line called

# UserBandwidth 8

I uncommeted out the line and changed it to 15 (small amount just for test purpose).

Restarted pure-ftp

WORKS PERFECT! It limits upload speeds and download speeds

Only issue is it does it for the whole server meaning all users. I was really really hoping to do it on a user basis only. I am still trying to find a way for this and if anyone can lend a hand on this pleaes. I have been over the past several weeks finding ways to mitigate large bandwidth spikes. When colocating on 95th percentile it can get quite expensive as these days big pipe DSL/cable wiill allow users to download & upload @ 15MB second from what i've seen(NOT joking!). So once I get FTP spikes out the way my next one is Apache bandwith and I believe I will be all set.
 
Last edited:

dragon2611

Well-Known Member
Nov 30, 2003
124
0
166
There is a utility that can throttle the whole NIC's maximium transfer to a set speed but I can't actually remember what it IS :(

Used it on a home machine once to stop it sucking up all the bandwidth when it was downloading.
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,133
1
168
New York
There is a utility that can throttle the whole NIC's maximium transfer to a set speed but I can't actually remember what it IS :(

Used it on a home machine once to stop it sucking up all the bandwidth when it was downloading.
Well under Freebsd you can use IPFW and dummynet to do just about anything. You could put bad websites on a private IP and then set the speed for just that one and the rest of the nic will do normal full speed. I know it can also slow down speeds by protocol so you could do max-speed setttings for something like ftp. I dont know if this is the same on the other *nix's.