I would like to permanently set the open file limit for all users in Centos 7, but there seems to be a lot of conflicting information out there on the googles.


3 Answers 3


Unless they've done something really wacky (if so, blame systemd) that's all set in /etc/security/limits.conf.

*    soft    nofile 8192
*    hard    nofile 8192

Something like that.


If you want to increase file limit for system service you'll have to edit /usr/lib/systemd/system/SOME_SERVICE.service

add LimitNOFILE,


and run systemctl daemon-reload to activate changes.

Please refer to systemd execution Limit directives documentation


It could be done by creating new config file in: /etc/security/limits.d/ (to be on safe side when upgrading etc). For example:


with content as written before by sysadmin1138:

*    soft    nofile 8192
*    hard    nofile 8192

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.