When the nofile is set to unlimited in /etc/security/limits.conf file the user cannot login

user  soft nofile 1024 
 
user  hard nofile unlimited
# su - user
could not open session



决议

This is a limit of  setrlimit().  The limit is 1048576.   So,  set limit less 1048577.


根源

That"s because the kernel have the following definition in ./linux/fs.h.

#define NR_OPEN (1024*1024)     /* Absolute upper limit on fd num */


你可能感兴趣的:(linux,cannot,Definition,because,following)