Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
Subject: application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
Subject: X Windows problem (xauth)
Subject: Upgrading openoffice 1 1 rpm
Subject: FTP: connection refused
Subject: FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
Subject: broadcom network interface
make mrproper
Couldn 't open PID file /var/run/named/named pid Permission denied
sendmail configuration on redhat
kernel 2 6 and /dev/sound/mixer not found
Subject: Promise 378 controller
Subject: Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
Subject: Lotus Notes under Wine
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
/etc/security/limits conf question
Intel E/1000 driver
rpm database corrupt
Command stream end of file while reading
qla2300 modules
 
Setting the maximum number files a user can open

Setting the maximum number files a user can open

2003-05-01       - By Simone Crider

 Back
Reply:     1     2     3     4     5     6  

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