LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-26-2008, 07:02 PM   #1
pjglinuxq
LQ Newbie
 
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
-bash: ulimit: open files: cannot modify limit: Operation not permitted


Okay, I know similiar threads have been posted before, but I'm stumped.

Background:
Linux 2.4.21-32.ELsmp
Development server runing Oracle 10.x

We've come across an issue within the Oracle RDBMS Server for which Oracle are recommending changing the following values for the oracle account:
open files from (-n) 65536 to unlimited
stack size from (kbytes, -s) 10240 to unlimited

Current ulimit -a (as oracle):
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited

So, login as oracle, 'ulimit -s unlimited' - no issues, works fine.

However, 'ulimit -n <anything above current limit>' .e.g 'ulimit -n 65537 - give the error '-bash: ulimit: open files: cannot modify limit: Operation not permitted'
'ulimit -n 50000' works okay, as its below the current 65536 limit. If however we then try and raise the limit again e.g 'ulimit -n 50001' - we also receive the same error (even though still below 65536).

/etc/security/limits/conf:
#<domain> <type> <item> <value>
#
#* soft core 0
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1000000
oracle hard nofile 1000000
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file

/etc/pam.d/login:#%PAM-1.0
auth required pam_securetty.so
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session optional pam_console.so
session required /lib/security/pam_limits.so
# above line added for oracle

Ideas?
Thanks
Paul
 
Old 02-26-2008, 07:19 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
You've listed /etc/security/limits/conf as the file - according to what I've seen using google it should be /etc/security/limits.conf. Have you tried it that way?

The info at http://www.akadia.com/services/ora_l...stall_10g.html may help. They also recommend not setting limits to the level of /proc/sys/fs/file-max:
Code:
If you do that and the user uses up all the file handles, then the 
system would run out of file handles. This could mean that you won't be 
able to initiate new remote logins any more since the system won't be able 
to open any PAM modules which are required for performing a login. That's 
why we set the hard limit to 63536 and not to 65536.
 
Old 07-18-2009, 12:29 PM   #3
shogun1234
Member
 
Registered: May 2004
Posts: 198

Rep: Reputation: 15
Quote:
Originally Posted by gilead View Post
You've listed /etc/security/limits/conf as the file - according to what I've seen using google it should be /etc/security/limits.conf. Have you tried it that way?

The info at http://www.akadia.com/services/ora_l...stall_10g.html may help. They also recommend not setting limits to the level of /proc/sys/fs/file-max:
Code:
If you do that and the user uses up all the file handles, then the 
system would run out of file handles. This could mean that you won't be 
able to initiate new remote logins any more since the system won't be able 
to open any PAM modules which are required for performing a login. That's 
why we set the hard limit to 63536 and not to 65536.
I change to use 63536, but I still get the error
Code:
-bash: ulimit: open files: cannot modify limit: Operation not permitted
what else I need to modify?

the /etc/profile is

Code:
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 63536
        else
              ulimit -u 16384 -n 63536
        fi
	umask 022
fi
/etc/security/limit.conf is

Code:
oracle          soft    nproc           2047
oracle          hard    nproc           16384
oracle          soft    nofile          1024
oracle          hard    nofile          65536
 
Old 06-11-2010, 06:19 AM   #4
Mapped
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
Make sure you have configued the /etc/pam.d/login correctly

session required /lib64/security/pam_limits.so
or
session required /lib/security/pam_limits.so
 
  


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
bash# "chvt N" as non-root says 'Operation not permitted' GrapefruiTgirl Linux - Desktop 4 09-16-2007 04:44 PM
Open Files (ulimit -n) questions megablue Linux - General 1 07-31-2006 12:35 AM
link two files in different partitions Operation not permitted osio Linux - General 14 07-19-2006 04:28 PM
Setting ulimit to increase # of open files dieyouspammer Slackware 6 02-01-2006 02:42 AM
change user's ulimit (open files) mpregent Linux - Newbie 1 07-07-2004 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration