The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Limiting Pure-FTP upload/download speed

Discussion in 'General Discussion' started by mm1250, Mar 29, 2008.

  1. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  2. ekg

    ekg Member

    Joined:
    Feb 22, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  3. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Anyone please? If anything I just need to limit the FTP uploading speed...
     
  4. anoopkumar

    anoopkumar Member

    Joined:
    Feb 15, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    India
  5. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

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


    root@hostname[/]# pure-pw usermod user@domain.com -T 10 -m
    and
    root@hostname[/]# pure-pw usermod user@domain.com -t 10 -m

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

    pure-pw show user@domain.com

    Login : user@domain.com
    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.
     
    #5 mm1250, Apr 15, 2008
    Last edited: Apr 15, 2008
  6. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  7. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Can someone please help me. Someone from cPanel please help.
     
  8. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Does anyonej know how to do this? If anyone can help me in getting this to work I will even pay for the help.
     
    #8 mm1250, Apr 16, 2008
    Last edited: Apr 16, 2008
  9. LiNUxG0d

    LiNUxG0d Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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,
     
  10. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    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 ?
     
  11. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    You should probably stick to ONE thread for each issue you face. It might help you to get an answer for your problem.
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    According to the SPEC file it is.
     
  13. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    198
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:

    Merged together.
     
  14. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
    #14 mm1250, Apr 20, 2008
    Last edited: Apr 20, 2008
  15. dragon2611

    dragon2611 Well-Known Member

    Joined:
    Nov 30, 2003
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  16. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    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.
     
Loading...

Share This Page