Unable to set open files limit via limits.conf

Solution Verified - Updated -

Issue

  • Unable to raise the open files limit, either via ulimit command or /etc/security/limits.conf file

    # cat /proc/sys/fs/file-max
    5096000
    
    # cat /proc/sys/fs/file-nr
    4448    0       5096000
    
    # 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 -lc 'ulimit -n'
    2048
    
    # 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