CENTOS7.5普通用户登录的时候有个提示-bash: ulimit: open files: cannot modify limit: Operation not permitted
一般来说我们都是修改文件/etc/security/limits.conf,我在文件中的配置如下
- soft nproc 65535
- hard nproc 65535
- soft nofile 65535
- hard nofile 65535
通过命令ulimit -a 查到的结果如下,与配置不符。
open files (-n) 400000
以为是配置失效,多次修改无法解决,突然想起修改openfile的另外一个方法修改/etc/profile,果然看到末行有如下内容,将其注释即可,问题解决。
ulimit -n 400000