ulimit -n does not show the paremeter

Support for security such as Firewalls and securing linux
Post Reply
alarmikus
Posts: 1
Joined: 2017/05/18 08:18:19

ulimit -n does not show the paremeter

Post by alarmikus » 2017/05/18 08:28:45

Hello all,

I can't make change nofile parameter.

Code: Select all

#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
*       -       nofile  2048
oracle       soft    nofile  16999
oracle       hart    nofile  16999
oracle       soft    nproc 16777
oracle       hard    nproc 16888
As you see I have corrected to 16999, but it show 2048:

Code: Select all

-bash-4.2$ ulimit -n
2048

However if I make nproc - it work:
To make the above changes permanent, you could also set the soft limit equal to the hard limit in /etc/security/limits.conf:

Code: Select all

oracle           soft    nproc          16384
oracle           hard    nproc          16384

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ulimit -n does not show the paremeter

Post by TrevorH » 2017/05/18 09:38:53

If your task is being started by systemd then you need to adjust the unit file to add the limits there. See man systemd.directives and search for Limit for the list of the parameters in question.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply