Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-16-2011, 03:06 AM
|
#1
|
LQ Newbie
Registered: Jul 2010
Posts: 22
Rep:
|
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..
|
|
|
05-16-2011, 09:32 AM
|
#2
|
Member
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Rep:
|
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.
|
05-16-2011, 09:52 AM
|
#3
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
05-17-2011, 01:38 AM
|
#4
|
LQ Newbie
Registered: Jul 2010
Posts: 22
Original Poster
Rep:
|
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
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.
|
|
|
|
05-17-2011, 08:44 AM
|
#5
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
05-17-2011, 10:50 PM
|
#6
|
LQ Newbie
Registered: Jul 2010
Posts: 22
Original Poster
Rep:
|
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
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.
|
|
|
05-18-2011, 08:32 AM
|
#7
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
All times are GMT -5. The time now is 02:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|