LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-16-2011, 03:06 AM   #1
srajeshkumar
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Rep: Reputation: 0
Thumbs up New open file size limit is getting reflected in the specific user


Hi Guys,
Last weekend i have increased the open file size (ulimit -n) for the application user id i have update the limits.conf file with necessary inputs restarted the service and the server as well, when i check the ulimit value for the specific user by switching user from other user it shows the new value (10240) but if i login directly using the application id the ulimit value shows as 1024 which one is the default one, can some one help me with this ? Thanks..
 
Old 05-16-2011, 09:32 AM   #2
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 179
Blog Entries: 1

Rep: Reputation: 25
Ulimit and App id file size

According to the information I have this is the advice on using ulimit:

This routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell
command ulimit(), see bash(1).

Best I can do for you. Try your man page or other documentation for ulimit on your version of Linux. Mine is Slackware 13.1.
 
0 members found this post helpful.
Old 05-16-2011, 09:52 AM   #3
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,952
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
You might want to verify you're not somehow overriding the ulimit value in /etc/profile, /etc/bash*, the user's .profile, .bashrc or .bash_profile (or any other environment filed called by any of those).

When you did the su to user did you do "su - <user>" or simply "su <user>". If the latter it explains why it worked - without the "-" it doesn't invoke the user's environment but instead inherits the calling user's (your) environment. With the "-" it invokes the user's environment. If there is a difference between the way it works with "su -" and "su" alone then it is almost certainly an environmental issue.

Can you show us what you put in limits.conf and tell us which user is affected? Also let us know what Linux distro and version.
 
Old 05-17-2011, 01:38 AM   #4
srajeshkumar
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Thanks for helping me

Hi,
Thanks for your attention here are the details you are looking for i switched user as su - <username> and the limits.conf file is updated with the below entry to increase the application user open file size.

username - nofile 10240

pls advice to resolve the issue and for your info if i switch from any other user to the application id the new value is captured only thing is if i directly login to the application id its showing the default value.

Thanks


Quote:
Originally Posted by MensaWater View Post
You might want to verify you're not somehow overriding the ulimit value in /etc/profile, /etc/bash*, the user's .profile, .bashrc or .bash_profile (or any other environment filed called by any of those).

When you did the su to user did you do "su - <user>" or simply "su <user>". If the latter it explains why it worked - without the "-" it doesn't invoke the user's environment but instead inherits the calling user's (your) environment. With the "-" it invokes the user's environment. If there is a difference between the way it works with "su -" and "su" alone then it is almost certainly an environmental issue.

Can you show us what you put in limits.conf and tell us which user is affected? Also let us know what Linux distro and version.
 
Old 05-17-2011, 08:44 AM   #5
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,952
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
What you have should work and did for me on testing. In fact on testing it didn't make a difference whether I did it as "su" or "su -" or direct login.

After you do the "su - <username>" type "whoami" to verify it shows you as username. After direct login do the same.

Check /var/log/* files to see if there is any complaint about limits from the pam modules.

Also please list your Linux distribution and version of same. This may be a known bug in your distro/version.
 
Old 05-17-2011, 10:50 PM   #6
srajeshkumar
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Here is the details requested

Hi

I have verified as per your instruction the whoami value is same for the direct login as well as the su - <user name> where it shows the same application user id. And the linux distribution is RHEL 5.2

Please advise further on this course.

Thanks









Quote:
Originally Posted by MensaWater View Post
What you have should work and did for me on testing. In fact on testing it didn't make a difference whether I did it as "su" or "su -" or direct login.

After you do the "su - <username>" type "whoami" to verify it shows you as username. After direct login do the same.

Check /var/log/* files to see if there is any complaint about limits from the pam modules.

Also please list your Linux distribution and version of same. This may be a known bug in your distro/version.

Last edited by srajeshkumar; 05-17-2011 at 10:54 PM.
 
Old 05-18-2011, 08:32 AM   #7
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,952
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
OK - my test was on CentOS 5.3 which is derived from RHEL 5.3 source.

Run "yum list pam" to see what version of pam you have installed and what version is available. This may be a bug in pam_limits that is fixed by a later version of pam.
 
  


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
limit the upload size for specific domain in squid kalidoss Linux - Server 0 10-24-2009 01:11 AM
downland limit size for specific users cb777 Linux - Newbie 1 02-26-2009 09:51 AM
limit specific proces to a specific user Tux-Slack Linux - Software 3 02-23-2007 11:38 PM
50M user file size limit FoxyLad Linux - General 4 02-02-2005 08:04 AM
How to limit the size of a specific file ericthyred Linux - Software 1 04-15-2004 11:13 AM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
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