httpd.service: Can't open PID file /run/apache2/httpd.pid (yet?) after start: Operation not permitted
Today in the security scan 2 old issues were reported again which I haven't been seeing for a couple of years.
1.) First were errors that logs in /var/log/apache2/mod_evasive couldn't be opened anymore due to permissions. Issue I encountered first 5 years ago.
Fixed it again by chmod that directory to 1777 just like I did 5 years ago on the previous server.
2.) When restaring apache, it's working. However, when asking apache status it returns this error:
httpd.service: Can't open PID file /run/apache2/httpd.pid (yet?) after start: Operation not permitted
I checked the /run/apache2 directory and the httpd.pid is present, also after reboot and requesting status, same error occurs.
-rw-r--r-- 1 root root 5 2025-07-24 22:07 httpd.pid
It's an odd error. I've seen older topics (from years ago) but not with a solution.
Apache is running so it's not very important, but it should not throw these errors so I'm looking for a solution.
-
2. That is normal, you get that "Can't open PID file /run/apache2/httpd.pid (yet?)" every time.
0 -
Really? Ah oke, I'm not used to getting errors in console on statusses. But I'm using the competition mostly.
So if you say I can ignore it safely then I will do that.
Thank you.
1 -
Thank you, but it's cPanels task to do that.
I'm running multiple servers on DA and I seldom have odd error messages in the apache logs and for sure not this one. So to me this is not really an Apache issue, otherwise you would see it everywhere. I only encountered it here.
0
Please sign in to leave a comment.
Comments
3 comments