Portal Home > Knowledgebase > Articles Database > ULimit Question
ULimit Question
Posted by elfz, 07-04-2009, 04:21 PM |
How do you limit the amount of processes a user can create? I'm running suEXEc mode and I want to limit the processes to 5 to prevent abuse and resource drainage.
|
Posted by vapetrov, 07-04-2009, 05:41 PM |
For RedHat Linux try to edit
/etc/security/limits.conf
Or tell what OS you using?
|
Posted by elfz, 07-04-2009, 06:58 PM |
RedHat. What do I need to edit in limits.conf?
|
Posted by PeakVPN-KH, 07-04-2009, 08:49 PM |
Simplest thing is say you only want to allow the user "kevin" 5 processes:
su - kevin
ulimit -n 5
Type: ulimit -n
to verify.
|
Posted by YUPAPA, 07-05-2009, 05:57 AM |
Look at the RLimitnProc of apache if you want to limit the process (like cgi) forked by apache
|
Posted by elfz, 07-06-2009, 07:19 PM |
I run LiteSpeed, but the settings don't seem to be limiting the max amount of processes...
Is there another way to set ulimit? Can't su into an account with a disabled shell.
|
Posted by Steven, 07-06-2009, 09:04 PM |
It probably wont work with limit.conf with litespeed. With apache you have to run a special patch on suphp which ties directly into pam
http://www.cpanel.net/apps/easyapache/custom.html
http://www.mail-archive.com/suphp@li.../msg00049.html
Unless litespeed comes up with a pam integrations your probably not going to limit them using pam's limits.
|
Posted by mistwang, 07-06-2009, 11:37 PM |
With LiteSpeed PHP suEXEC, the maximum PHP process each account can have is limited to the value of "PHP suEXEC max conn". No need to set "Process Limit", if set it too low, you may get 503 error or other strange issues.
|
Add to Favourites Print this Article
Also Read
SSL setup (Views: 657)