Apache2 and PAM Limits: Difference between revisions
From WikiMLT
Created page with "Within the output of the command <code>systemctl status apache2.service</code> was found the following error messages:<syntaxhighlight lang="shell-session"> pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=33,euid=0 pam_limits(sudo:session): Could not set limit for 'nofile' to soft=1024, hard=1048576: Operation not permitted; uid=33,euid=0 </syntaxhighlight>The solution is provided within the answers of the questio..." |
m Стадий: 1 [Фаза:Идентифициране, Статус:Създаване]; Категория:Web Servers |
||
Line 1: | Line 1: | ||
<noinclude><!--[[Category:Web_Servers|?]]-->{{ContentArticleHeader/Web_Servers}}</noinclude> | |||
== References == | |||
* ... | |||
* ... | |||
== Section 1 == | |||
... | |||
Within the output of the command <code>systemctl status apache2.service</code> was found the following error messages:<syntaxhighlight lang="shell-session"> | Within the output of the command <code>systemctl status apache2.service</code> was found the following error messages:<syntaxhighlight lang="shell-session"> | ||
pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=33,euid=0 | pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=33,euid=0 | ||
Line 16: | Line 25: | ||
* hard nofile 1048576 | * hard nofile 1048576 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<noinclude> | |||
<div id='devStage'> | |||
{{devStage | |||
| Прндл = Web Servers | |||
| Стадий = 1 | |||
| Фаза = Идентифициране | |||
| Статус = Създаване | |||
| ИдтПт = {{REVISIONUSER}} | |||
| ИдтДт = {{Today}} | |||
| ИдтРв = {{REVISIONID}} | |||
}} | |||
</div> | |||
</noinclude> |
Revision as of 11:01, 2 August 2022
References
- …
- …
Section 1
…
Within the output of the command systemctl status apache2.service
was found the following error messages:
pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=33,euid=0
pam_limits(sudo:session): Could not set limit for 'nofile' to soft=1024, hard=1048576: Operation not permitted; uid=33,euid=0
The solution is provided within the answers of the question How to set ulimit value permanently? at Server Fault. The applied steps are shown below, and of course the server was restarted.
sudo nano /etc/pam.d/common-session
# https://serverfault.com/questions/610130/how-to-set-ulimit-value-permanently
session required pam_limits.so
sudo nano /etc/security/limits.conf
# https://serverfault.com/questions/610130/how-to-set-ulimit-value-permanently
* soft core 0
* hard core -1
* soft nofile 65535
* hard nofile 1048576