欢迎光临散文网 会员登陆 & 注册

su: cannot not open session: Permission denied

2023-04-08 19:54 作者:淡定的茶  | 我要投稿

相关参数:

/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 的值。


su: cannot not open session: Permission denied的评论 (共 条)

分享到微博请遵守国家法律