轉自:http://q.pnq.cc/blog/2015/08/09/why-the-limits-config-not-hornored/ bash
正常狀況下, /etc/security/limits.conf
的改動,應該在下次訪問時就生效纔對。session
如不生效多是如下幾個緣由:
ssh
在 /etc/pam.d/login
中,存在:ide
session required pam_limits.so
在 /etc/pam.d/sshd
中,存在:ui
session required pam_limits.so
在 /etc/ssh/ssd_config
中, 存在:spa
UsePAM yes
官方 manual 以及網上的教程有不少都用了 *
符號,然而不是全部系統都認的code
# 不兼容方式: * soft nofile 51200 * hard nofild 51200 # 兼容方式 root soft nofile 51200 root hard nofile 51200 qhwa soft nofile 51200 qhwa hard nofile 51200