[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Too many open files



On Fri, Aug 22, 2025 at 2:45 PM Ken Mankoff <mankoff@gmail.com> wrote:
> I cannot set ulimit -Hn above the current value of 32768. But for now, things seem to be working better.

That's probably set via PAM or the like for a default max hard limit
for most users.
One could reconfigure that, if needed/desired, but then the downside
to that would be
greater risk of Denial of Service (DoS) issues, from accidents, bugs, or other
issues (overzealous user?) consuming excess resources, and potentially
impacting system as a whole, rather than just their own account.
So, use due caution if one changes such a default.
Note also that it is also possible to raise limits in more
limited manner - notably on a per-user basis, and yes, again,
PAM makes that possible.  There's even a way to do it where
one sets it in the GECOS/comment field in /etc/passwd - but
in that case, would generally want to be sure (at least untrusted)
users can't change that data themselves (suitably restrict,
if present, chfn and the like).  See, e.g.:
pam_limits(8) for another similar PAM per-user approach.
And ... the method via /etc/passwd GECOS/comment
field may be from older/historic PAM implementations?
I'm not easily spotting that among current PAM modules.


Reply to: