I"m ~ above Ubuntu 17.04. Make the efforts to boost the open document limit, and also none the the accuse I"ve uncovered online space working. I deserve to go as much as 4096, however can"t go past that.

You are watching: Ulimit open files cannot modify limit operation not permitted

$ ulimit -n1024$ ulimit -n 4096$ ulimit -n4096That works. This doesn"t:

$ ulimit -n 4097bash: ulimit: open files: can not modify limit: operation not permittedIt shows up to be since of the tough limit:

$ ulimit -Hn4096I"ve tried adding these lines come /etc/security/limits.conf:

* hard nofile 65535* soft nofile 65535root soft nofile 65535root hard nofile 65535Also included this heat to /etc/pam.d/common-session and also /etc/pam.d/common-session-noninteractive:

session compelled pam_limits.soSince law that, I"ve rebooted mine computer. Alters to limits.conf don"t it seems ~ to affect anything. The tough limit is still grounding at 4096, avoiding me native going any higher. How carry out I boost my open papers limit?

Here"s some added config info:

$ cat /proc/sys/fs/file-max 1624668
linux ubuntu ulimit ubuntu-17.04
boost this question
edited Apr 17 "17 in ~ 19:13
request Apr 17 "17 in ~ 17:54


2,18311 yellow badge1616 silver- badges1919 bronze badges
include a comment |

5 answer 5

energetic earliest Votes
OK, I lastly figured this out. The limits I was setup in /etc/security/limits.conf were undoubtedly being applied, however not to the graphical login. This deserve to be showed from a terminal window:

$ ulimit -n4096$ su mkasbergPassword:$ ulimit -n65535More research led me come this pest report, which gained me sharp in the best direction. In order to modify the limit the is offered by the login shell, we require to include the adhering to line come /etc/systemd/user.conf:

DefaultLimitNOFILE=65535That adjust works, but only influence the soft limit. (Leaving us capped v a hard limit the 4096 still.) In order to influence the difficult limit, we have to modify /etc/systemd/system.conf v the very same changes.

The alters I make in /etc/pam.d were not necessarily; it"s already working, at the very least on Ubuntu. Also, it was not important to include the lines root and * in limits.conf; adding the username alone (mkasberg in my case) was sufficient.

See more: Finding Where Your Rights End Where Mine Begin : Libertarian

In Summary

If you want to rise the limit presented by ulimit -n, girlfriend should:

Modify /etc/systemd/user.conf and /etc/systemd/system.conf v the following line (this takes care of graphical login):

DefaultLimitNOFILE=65535Modify /etc/security/limits.conf v the following lines (this takes care of non-GUI login):

mkasberg hard nofile 65535 mkasberg soft nofile 65535Reboot your computer for alters to take it effect.