最新消息:

Could not set limit for ‘nofile’: Operation not permitted

pam admin 319浏览 0评论

ssh登录相关日志
Apr 10 11:01:36 Linux sshd[14007]: Accepted keyboard-interactive/pam for usr_ins from 192.168.222.125 port 37472 ssh2
Apr 10 11:01:36 Linux sshd[14007]: pam_limits(sshd:session): Could not set limit for ‘nofile’: Operation not permitted
Apr 10 11:01:36 Linux sshd[14007]: error: PAM: pam_open_session(): Permission denied

控制台登录相关日志
Apr 10 11:01:50 Linux login[13736]: pam_limits(login:session): Could not set limit for ‘nofile’: Operation not permitted
Apr 10 11:01:50 Linux login[13736]: Permission denied

 

一、操作:

修改/etc/security/limits.conf

  • hard nofile 1200000

二、现象:

  • ssh登录后退出
  • 控制台登录后界面空白

三、定位:

使用光盘引导,进入Rescue System查看message

四、解决:

sysctl 设置 fs.nr_open 大于等于 /etc/security/limits.conf 的 hard nofile

转载请注明:爱开源 » Could not set limit for ‘nofile’: Operation not permitted

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址