天天看點

ulimit登陸伺服器報錯

閑來無事登陸伺服器發下登陸提示有報錯

報錯提示:

Last login: Fri May 23 01:37:04 2014 from 101.71.249.170

-bash: ulimit: open files: cannot modify limit: Operation not permitted

看提示是沒有權限的意思

檢視登陸需要加載的檔案

/etc/profile

有發現

ulimit -n 65535

ulimit -u 10240

伺服器是禁止root登陸的。使用者一般使用者登陸肯定是會提示的,因為沒有權限是設定ulimit

解決:

追加ulimit配置檔案如下内容:

/etc/security/limits.conf

* soft nofile 65535

* hard nofile 65535

重新登陸恢複

繼續閱讀