[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Setting the maximum number files a user can open



Hi!

I'm in hopes that someone can assist me w/ the following problem ... I
cannot change the ulimit -n value as a regular user.  I found the
following documentation ...


Setting the maximum number files a user can open   
By the Red Hat Linux Support Team    
Issue 
User wants to let the user open more files than permitted by default. 
Resolution 
Here\'s an example on how to give userx the ability to open 16000 file
concurrently.

Set /proc/sys/fs/file-max to the total number of files that can be
openned by all users (eg. in /etc/sysctl.conf, fs.file-max = 20000, then
sysctl -p).

edit /etc/security/limits.conf:
userx hard nofile 16000

login as userx, from command line, enter \"ulimit -n 16000\"
to make permanent, edit /home/userx/.bashrc:
ulimit -n 16000 
  
...

I get the following error when trying to change the value as a regular
user ...

bash: ulimit: cannot modify limit: Operation not permitted

***  The following info is specific to my server ...

$ uname -a
Linux dolphin 2.4.18-27.7.x #1 Fri Mar 14 06:44:53 EST 2003 i686 unknown

# sysctl -a |grep file
fs.file-max = 52362
fs.file-nr = 281        17      52362

# cat /etc/security/limits.conf
...
...
# Added to up the number of open file limits for the following users:
arcims          soft    nofile          1024
arcims          hard    nofile          5120

# cat /etc/pam.d/system-auth   
...
...

session     required      /lib/security/pam_limits.so
session     required      /lib/security/pam_unix.so

I log out & then login as a regular user & get the following error ...

$ ulimit -n 2048
bash: ulimit: cannot modify limit: Operation not permitted

Appears that because I am a non-root user, that I cannot perform this
command.  I thought that by changing the hard limit that a regular user
would then be able to modify this value, at least to the hard limit?

Has anyone seen this behavior before?  Is there a workaround or am I
missing something?

Any assistance will be greatly appreciated!

Simone Crider





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]