LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 04-09-2013, 07:05 AM   #1
visu_kvg
LQ Newbie
 
Registered: Aug 2009
Location: HYD,India
Distribution: RHEL
Posts: 19

Rep: Reputation: 0
Confused with limits.conf and lsof


Hi All,

My limits.conf is configured as below.

Code:
xyz soft nproc 20
xyz hard nproc 25
xyz soft nofile 150
xyz hard nofile 200
As per the above config I understand that the user xyz cannot have more than 200 open files. However user xyz exceeded the hard limit without any issues and looks to be having no problems at all.lsof output show more than 200 as below.

Code:
[root@example ~]# lsof -u xyz|wc -l
569
I am running RHEL 5.5. Any help making me understand what I am missing is greatly appreciated!

Thanks
 
Old 04-09-2013, 08:56 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,325

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
Did you change the limits while the user was logged in?

I believe you have to have the user log out, and back in for the limits to be applied.

Also check the PAM configuration, and make sure it sets the limits.
 
Old 04-09-2013, 09:43 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
I agree, I don't believe its retrospective, otherwise it would have to start killing of stuff, which would be a bad thing...
 
Old 04-09-2013, 10:12 AM   #4
visu_kvg
LQ Newbie
 
Registered: Aug 2009
Location: HYD,India
Distribution: RHEL
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jpollard View Post
Did you change the limits while the user was logged in?

I believe you have to have the user log out, and back in for the limits to be applied.

Also check the PAM configuration, and make sure it sets the limits.
Thank you for quick reply.
I have rebooted after making changes to limits.conf. Limits are enforced via PAM config.
 
Old 04-09-2013, 10:42 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,325

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
so it is fixed now?
 
Old 04-10-2013, 01:31 AM   #6
visu_kvg
LQ Newbie
 
Registered: Aug 2009
Location: HYD,India
Distribution: RHEL
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jpollard View Post
so it is fixed now?
No. It is not fixed yet. However, I found one useful pointer below

http://www.netadmintools.com/part295.html

This answers most of my questions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting limits in /etc/security/limits.conf vaibhav.vsk Linux - Security 1 09-20-2012 09:22 AM
Limits.conf digitaldude Linux - Server 2 10-27-2011 02:56 AM
etc/security/limits.conf - what does it do? Ken_1969 Red Hat 5 03-14-2010 05:25 PM
How do I activate limits.conf davidstvz Linux - Newbie 2 09-18-2009 01:46 PM
limits are not working (limits.conf) PkerC Red Hat 3 06-22-2006 11:14 AM


All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration