Results 1 to 6 of 6
Here's the problem !, I want some specific users on my box have higher user limits, to do some specific tasks, however !
I tried using the ulimit command, modifying ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-05-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 4
User Limits In Linux
Here's the problem !, I want some specific users on my box have higher user limits, to do some specific tasks, however !
I tried using the ulimit command, modifying the /etc/security/limits.conf and /etc/profile ! but I still get the `uname -n` = 100 !
can anyone help help me with this issue or provide me some link and/or instruction to do this type of work, btw I'm using a CentOS 4 box ...
--
Regards ...
- 04-11-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 4
It's been about a week but no reply ! ...
But I'd appreciate any idea anyways ...
--
Regards ...
- 04-11-2007 #3What do you mean? Give examples of the problem you're trying to solve.I want some specific users on my box have higher user limits, to do some specific tasks
- 04-17-2007 #4Just Joined!
- Join Date
- Apr 2007
- Posts
- 4
Thanks 4 the reply !!
Originally Posted by anomie
Well let's be more specific, I need a user have it's `ulimit -n` set to 2048 while all other users (except for root) has a 256 value for their open files !
I've edited the /etc/security/limits.conf and added :
and added these lines to the /etc/profile :ricd hard nofile 2048
ricd soft nofile 1024
But I still get the `ulimit -n` 100 for the ricd userif [ `/usr/bin/whoami` = "ricd" ]; then
ulimit -n 1024 2>/dev/null
fi
- 04-20-2007 #5
I'm pretty sure /etc/profile gets run as root, so your conditional test will always be false.
Could you just add the ulimit specification to ricd's ~/.bash_profile?
- 04-23-2007 #6Just Joined!
- Join Date
- Apr 2007
- Posts
- 4
Well, @ first I thought this might be the problem that /etc/profile runs as root, but some time ago I read the cPanel 10 Documention, and there is a block of code (that right now I copied from the documention here) added to /etc/profile !
Originally Posted by anomie
So, this tells me /etc/profile does not run as root I think !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 512 -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
Well, I tried addingand then using the conditional sentence with $LIMITUSER, but I still hae the same old problem !Code:if [ -e "/usr/bin/whoami" ]; then LIMITUSER=`/usr/bin/whoami` fi
about the ~/.bash_profile idea, I'll check it
Thanks again
--- UPDATE ---
I've tried adding the following line to the .bash_profile :
But I get the same result !!!Code:ulimit -n 1024 2>/dev/null


Reply With Quote
