Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Fork/Bomb Help

Discussion in 'General Discussion' started by Sheps, Apr 12, 2004.

  1. Sheps

    Sheps Member

    Joined:
    Oct 20, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Hellom

    I am just wondering if any of you people have any ideas how to exempt a user or two from the fork/bomb settings? I tried editing the bashrc and the script in /usr/local/cpanel/ Didn't help at all.

    If anyone knows anything, it would be very, very helpful. Right now, I have it disabled, but I trust most of my users. :P

    Anyways, anything at all would be helpful, especially something from one of the developers telling me which files impose the limits... :D
     
  2. Sheps

    Sheps Member

    Joined:
    Oct 20, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Anyone have any ideas? Searching google extnesively yeilded nothing.

    Would help alot if I got this figured out.
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Just had a quick look. It appears that the fork/bomb protection for shell users is controlled by /etc/profile

    If you look at the top of the file, you should see (when enabled):
    Code:
    #cPanel Added Limit Protections -- BEGIN
    
    #unlimit so we can run the whoami
    ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
    
    LIMITUSER=$USER
    if [ -e "/usr/bin/whoami" ]; then
            LIMITUSER=`/usr/bin/whoami`
    fi
    if [ "$LIMITUSER" != "root" ]; then
            ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
    else
            ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
    fi
    #cPanel Added Limit Protections -- END
    
    I would have thought that with a little bash script modification you could exempt certain users.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Sheps

    Sheps Member

    Joined:
    Oct 20, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Just wondering if anyone knows anything about this yet?

    BTW, I did try and edit all of the bash scripts I could find. It did not help me with disabling it for one user at all.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice