FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-08-2009, 03:02 PM
John Doe
 
Default No ulimit for user

From: Stephen Nelson-Smith <stephen@atalanta-systems.com>
> I'm trying to remove any limit on open files for a user; I've set
> username nofiles to unlimited in /etc/security/logins.conf, but now I
> get "could not open session" if I try to su to the user.
> singhh - nofile unlimited

Don't you mean /etc/security/limits.conf ?

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-08-2009, 03:38 PM
"nate"
 
Default No ulimit for user

Stephen Nelson-Smith wrote:
> Hi,
>
> I'm trying to remove any limit on open files for a user; I've set
> username nofiles to unlimited in /etc/security/logins.conf, but now I
> get "could not open session" if I try to su to the user.
>
> singhh - nofile unlimited

I think that is an invalid config, just set the limit to something
really high

# ulimit -n unlimited
-bash: ulimit: open files: cannot modify limit: Operation not permitted

Looks like somewhere around the 1 million mark is the max, can't
imagine why anyone would have a system that would have so many
files open.. The max I allow any user is 10,000 which seems
reasonable.

nate


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-08-2009, 05:28 PM
Stephen Nelson-Smith
 
Default No ulimit for user

2009/12/8 John Doe <jdmls@yahoo.com>:
> From: Stephen Nelson-Smith <stephen@atalanta-systems.com>
>> I'm trying to remove any limit on open files for a user; I've set
>> username nofiles to unlimited in /etc/security/logins.conf, but now I
>> get "could not open session" if I try to su to the user.
>> singhh * * * * *- * * * nofile * * * * *unlimited
>
> Don't you mean /etc/security/limits.conf ?

Yeah... duh :-O

S.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-08-2010, 06:54 PM
Alan McKay
 
Default No ulimit for user

On Tue, Dec 8, 2009 at 11:02 AM, John Doe <jdmls@yahoo.com> wrote:
> From: Stephen Nelson-Smith <stephen@atalanta-systems.com>
>> I'm trying to remove any limit on open files for a user; I've set
>> username nofiles to unlimited in /etc/security/logins.conf, but now I
>> get "could not open session" if I try to su to the user.
>> singhh * * * * *- * * * nofile * * * * *unlimited
>
> Don't you mean /etc/security/limits.conf ?

OK, I went searching the list archives on this one and found this, and tried it.

And now I can no longer log into the Centos 5.4 box. Even on the console.

Not a big deal since this is a VM running in my sandbox so I can blow
it away no problem.

But how do I increase my ulimit to unlimited?

I put in that file

* - nofile unlimited

and then rebooted the box

And can no longer log in




--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-08-2010, 07:04 PM
Alan McKay
 
Default No ulimit for user

OK, I just found this

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=13144

Which says that you cannot use "unlimited" for nofile

It says to do this

* soft nofile 63536
* hard nofile 63536

or "more realistically" to do this :

* soft nofile 8192
* hard nofile 63536

But I still cannot find what is the difference between the hard and soft limit

Also, once this file has been changed, does the system need to be
rebooted for it to take affect?

Or does it automatically take affect for any new processes? So just
restart any service I want to take advantage of it?


thanks,
-Alan



--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-08-2010, 07:08 PM
Alan McKay
 
Default No ulimit for user

Sorry for the frequent updates - but I also found this :

http://gnufreakz.wordpress.com/2009/08/12/increase-ulimit-in-centos/

which talks about setting

“fs.file-max = 65536″

in sysctl.conf

Does it have to be set in both sysctl.conf and the /etc/security/limits.conf?

If so, why?

thanks,
-Alan



--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org