Red Hat Security - open files: cannot modify limit: (ulimit -n) error

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Security > July 2006 > open files: cannot modify limit: (ulimit -n) error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author open files: cannot modify limit: (ulimit -n) error
GemNEye

2006-07-26, 7:27 pm

I have an Itanium based system running Red Hat Enterprise Linux AS
release 4 (Nahant Update 1).

The contents of /proc/sys/fs/file-max is: 1660043

The contents of /etc/security/limits.conf contain:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 1024
oracle hard stack 32768

The contents of /etc/pam.d/sshd :

#%PAM-1.0
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_access.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 required pam_limits.so
session optional pam_console.so

If I `sudo su - oracle' and then type:

ulimit -n 65536

I get the following error returned:

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

On the other hand, if I am root, and then `su - oracle' and then type
`ulimit -n 65536' the error is not generated, and the open files limit
is set to 65536 as can be seen from the output from `ulimit -a'.

I know the bash man page states the following for the -n switch for
ulimit:

-n The maximum number of open file descriptors (most systems do not
allow this value to be set)

Although this may be true, you can see that I was able to use the -n
switch and change the open files from its default value of 1024 to the
hard limit of 65536 set in the limits.conf file.

I have googled and have seen a few posts dealing with this similar
issue, but I have not seen a solution or explanation for the problem.

Does anyone know what is causing this error and how to fix it?
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com