Translated message

A translation of this page exists in English.

ulimit または /etc/security/limits.conf を使用しても、オープンできるファイル数を制限できない理由

Solution Unverified - Updated -

Issue

  • ulimit または /etc/security/limits.conf を使用しても、オープンできるファイル数を制限することができません。
# grep limit /etc/pam.d/system-auth
session     required      pam_limits.so

# egrep -v "^$|^#" /etc/security/limits.conf
<Username>           hard    nofile          65536
<Username>           soft    nofile          32768

# su <Username> -c "exec /bin/bash -l -c \"ulimit -n\""
2048

# cat /proc/sys/fs/file-max
5096000

# cat /proc/sys/fs/file-nr
4448    0       5096000

# su - <Username>
$ ulimit -n
2048

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

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content