Re: cannot raise the limit of max open files for other users than root
- Date: Wed, 30 May 2018 11:50:19 +0000 (UTC)
- From: davidson <davidson@xxxxxxxxxxxx>
- Subject: Re: cannot raise the limit of max open files for other users than root
On Wed, 30 May 2018, s7r wrote:
Running Debian Stretch here.
I modified /etc/security/limits.conf with limits for soft/hard nofile to
10000 for * (any user), root and my username. Also added session
requried to /etc/pam.d/common-session* files.
Only for root ulimit -Hn or -Sn shown the correct number. For my
username it did not work until I edited /etc/systemd/user.conf and
/etc/systemd/system.conf with the number of max open files I am willing
to allow for this user.
If you had begun this non-root session *before* editing
/etc/security/limits.conf, then you should not have expected
$ ulimit -Sn
(for example) *in that session* to reflect your edits:
| $ man 5 limits.conf
| Also, please note that all limit settings are set per login. They
| are not global, nor are they permanent; existing only for the
| duration of the session.
To see the new limits take effect in a session, you would have needed
to log in to that session in *after* making the changes.
For the record, on stretch, here, in tty3:
$ ulimit -Sn
And then, in tty2
# echo '* soft nofile 1025' >> /etc/security/limits.conf
And then again, back in tty3 (without logging out), as documented
$ ulimit -Sn # No change, no surprise.
But then, logging out of tty3...
...and logging back in again on tty3 as same regular user:
$ ulimit -Sn # Change reflected.
Is this a bug or expected behavior? Why doesn't it work from editing
Maybe it did work exactly as expected. Or maybe it didn't. We need
more information on the sequence of your logins, relative to the
changes to limits.conf, to tell whether the behavior that surprised
you in your non-root session was inconsistent with the documented
[Redacted] Arrested for [Redacted] Outside [Redacted]: Leeds Crown Court Issues Media Ban