[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to set permanent ulimit



so the question still is: how can I set ulimit to be permanent? e.g.:
10240 after reboot? :D

there's no way for it?:O

On k, 2010-01-26 at 15:42 -0500, Stephen Powell wrote:
> On 2010-01-26 at 14:40:23 -0500, Alex Samad wrote:
> > have a look at /etc/security/limits.conf
> > 
> > I have 2 lines in there that are not commented
> > 
> > @user hard nofile 2048
> > alex hard nofile 4198
> 
> That works!  I modified my /etc/security/limits.conf file and added the following entry:
> 
> *               hard    nofile          1048
> 
> I then shutdown and rebooted.
> 
> I login as a normal user and issue
> 
>    $ ulimit -n
>    1024
>    $ ulimit -n 1048
>    $ ulimit -n
>    1048
>    $ ulimit -n 2000
>    -bash: ulimit: open files: cannot modifiy limit: Operation not permitted
> 
> The limit starts at the default of 1024, just as before.  But ordinary users can raise it
> up to and including the new hard limit of 1048.  But they cannot raise it above that.
> To raise it above the hard limit you must be root.
> 
> Thanks, Alex!
> 
> 



Reply to: