LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   New open file size limit is getting reflected in the specific user (https://www.linuxquestions.org/questions/linux-server-73/new-open-file-size-limit-is-getting-reflected-in-the-specific-user-880953/)

srajeshkumar 05-16-2011 03:06 AM

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..

lisle2011 05-16-2011 09:32 AM

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.

MensaWater 05-16-2011 09:52 AM

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.

srajeshkumar 05-17-2011 01:38 AM

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 (Post 4357889)
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.


MensaWater 05-17-2011 08:44 AM

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.

srajeshkumar 05-17-2011 10:50 PM

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 (Post 4358844)
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.


MensaWater 05-18-2011 08:32 AM

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 06:51 PM.