LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   -bash: ulimit: open files: cannot modify limit: Operation not permitted (https://www.linuxquestions.org/questions/linux-newbie-8/bash-ulimit-open-files-cannot-modify-limit-operation-not-permitted-758585/)

investmentbnker75 09-29-2009 10:46 PM

-bash: ulimit: open files: cannot modify limit: Operation not permitted
 
I have a server. When i su - userid i get the error above. Does someone have a solution?

Thanks

irabinovitch 09-30-2009 12:19 AM

Quote:

Originally Posted by investmentbnker75 (Post 3701309)
I have a Linux server with oracle. When i su - oracleid i get the error above. But when i su - oracleid2 i dont get the error, just on the first oracle id. Looking at the .bash_profile for both users, they are identical. Does someone have a solution and a reason why one oracle id give this error and the other doesnt?

Thanks


Check your settings in /etc/security/limits.conf It is possible that oracleid2 has been set to allow a higher ulimit settings.

investmentbnker75 09-30-2009 04:16 PM

I have read that in other posts. Could you please let me know what the settings would be to set everything to unlimited?

irabinovitch 09-30-2009 04:29 PM

Quote:

Originally Posted by investmentbnker75 (Post 3702336)
I have read that in other posts. Could you please let me know what the settings would be to set everything to unlimited and how does it take affect for oracleid2?

Generally you don't want to set unlimited so as to prevent run away processes and application from impacting your system.

chrism01 09-30-2009 06:10 PM

What it means is there are already a max num of open files being used by oracleid.
You need to find out what they are eg lsof http://linux.die.net/man/8/lsof, fuser http://linux.die.net/man/1/fuser.
You may be able to justify raising the limit for that user, but I wouldn't set it unlimited for the reasons described above.

irabinovitch 09-30-2009 08:15 PM

Quote:

Originally Posted by chrism01 (Post 3702500)
What it means is there are already a max num of open files being used by oracleid.
You need to find out what they are eg lsof http://linux.die.net/man/8/lsof, fuser http://linux.die.net/man/1/fuser.
You may be able to justify raising the limit for that user, but I wouldn't set it unlimited for the reasons described above.

I do not believe that the error in question is caused by reaching the max number of open files. Instead it appears the users bash profile is attempting to set the number of open files to a higher number than than the hard limit specified in limits.conf.

I would encourage the original poster to check what their bash_profile, etc are try to set the max # of open file handles to and if its reasonable set the soft/hard limits in limits.conf accordingly. If I recall correctly Oracle recommends setting them quite high, but again setting to unlimited is probably not desirable.

If however when setting a lower number you begin to encounter errors about reaching the max number of open files, you should use lsof command as Chris mentioned and check what files are open.

investmentbnker75 10-06-2009 08:53 AM

Well, i set the limits to unlimited. Why did this happen
Thanks for all the input!

chrism01 10-06-2009 07:00 PM

From http://linux.die.net/man/5/limits.conf
[quote]
hard
for enforcing hard resource limits. These limits are set by the superuser and enforced by the Kernel. The user cannot raise his requirement of system resources above such values.
[\quote]
Same principle as disk quotas, soft limits are a warning, hard limits cannot be overridden by user.

investmentbnker75 10-06-2009 09:22 PM

In what scenerio would only one user be affected by this limit?

irabinovitch 10-07-2009 12:32 AM

Quote:

Originally Posted by investmentbnker75 (Post 3710434)
In what scenerio would only one user be affected by this limit while other users on the server aren't? If the limits.conf file has a file limit of 4096, does this mean that this userid has files open that exceeds this limit in the limit.conf file?


limits.conf allows you to set these on a per user/group level. Is it possible its specifically set higher for an the user thats not encountering problems? Maybe you can provide an excerpt or the full file here?

investmentbnker75 10-07-2009 10:32 AM

Thank for the response all. Why the issue happened in the first place.


Is it safe to assume that this particular user exceeded the hard limit?

chrism01 10-07-2009 06:21 PM

See the links in my post #5

investmentbnker75 10-09-2009 06:52 AM

Chris, while i appreciate the response, i was just looking for a quick answer to my basic questions. I have read the man pages you posted before i posed this question but wanted to clarify the issues i was having even more, thats why i posted this issue. So im hoping for someone has run into this issue before and can just clarify it a little bit for me.


All times are GMT -5. The time now is 09:54 AM.