Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.