su: cannot not open session: Permission denied
相關參數:
/etc/security/limit.conf
user ? soft ? ?nofile ? ?2000000
user ? hard ? ?nofile ? ?2000000
此值和fs.nr_open有關,設置不能超過這個值,否則不能登陸用戶,
提示:su: cannot not open session: Permission denied
2.6.25內核之前有個宏定義,定義了這個值的最大值,為1024*1024,正好是100萬,而在2.6.25內核及其之后,這個值是可以通過/proc/sys/fs/nr_open來設置
設置fs.file-max = 2000000 ? ? ? fs.file-nr = 2272 ? ? ? 0 ? ? ? 2000000
fs.file-nr的最大值會取fs.file-max 的值。
標簽: