[arch-general] Apache PID File not readable
Hi, I always get this message after restarting apache via systemctl: PID file /run/httpd/httpd.pid not readable (yet?) after start. I have already used google and I found this: http://serverfault.com/questions/501687/error-pid-file-run-httpd-httpd-pid-n... https://bugs.archlinux.org/task/32708 http://stackoverflow.com/questions/16156761/error-pid-file-run-httpd-httpd-p... Any ideas to avoid this message? I can chown the file, but after restarting apache it's the same problem. Apache seems to work fine but the restarting procedure needs a very long time...
On Sun, Jul 28, 2013 at 8:03 AM, Stefan Tatschner <stefan.tatschner@gmail.com> wrote:
I always get this message after restarting apache via systemctl: PID file /run/httpd/httpd.pid not readable (yet?) after start.
What does cat /usr/lib/tmpfiles.d/apache.conf return? =-Jameson
On Sun, Jul 28, 2013 at 8:03 AM, Stefan Tatschner <stefan.tatschner@gmail.com> wrote:
I always get this message after restarting apache via systemctl: PID file /run/httpd/httpd.pid not readable (yet?) after start.
What does cat /usr/lib/tmpfiles.d/apache.conf return?
=-Jameson
Wow, this thread has just made me realized that there was a run directory in root dir. I have always though that pid files were supposed to go in /var/run by convention. I'm probably late in the news but can someone explain rationales behind that? I'm guessing that it is to avoid problems with /var being a mounted fs and make sure that pidfile dir is always there by putting it in the rootfs. but then, isn't it a bit awkward considering the recent change to deprecate /bin /lib and /sbin?? ________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
[2013-07-29 18:39:09 +0000] LANGLOIS Olivier PIS -EXT:
Wow, this thread has just made me realized that there was a run directory in root dir.
That happened a year ago. See: https://mailman.archlinux.org/pipermail/arch-dev-public/2011-December/022226... -- Gaetan
On Mon, Jul 29, 2013 at 12:15 PM, Jameson <imntreal@gmail.com> wrote:
On Sun, Jul 28, 2013 at 8:03 AM, Stefan Tatschner <stefan.tatschner@gmail.com> wrote:
I always get this message after restarting apache via systemctl: PID file /run/httpd/httpd.pid not readable (yet?) after start.
What does cat /usr/lib/tmpfiles.d/apache.conf return?
There lies Stefan's problem. It creates the directory as root:root. And this can be a bug or not a bug depending on your take: a.) A bug: The default apache config uses user and group http but the install script doesn't create them!!! And the tmpfile config should user http as user and group for the pid directory. b.) Not a bug. Those are software defaults, you should make sure everything is configured with tight security and no default values will help you there. Furthermore, there is already a nobody user and group defined, use that. So, pick you battle and file a bug, or not. :-) -- http://about.me/palopezv
My first answer was rejected because I messed up the conversation history. Here is a new try. 2013/7/29 Jameson <imntreal@gmail.com>:
What does cat /usr/lib/tmpfiles.d/apache.conf return?
stefan@archvm ~ $ sudo cat /usr/lib/tmpfiles.d/apache.conf d /run/httpd 0755 root root - That seems to be the problem...
El jul 30, 2013 2:10 AM, "Stefan Tatschner" <stefan.tatschner@gmail.com> escribió:
My first answer was rejected because I messed up the conversation history. Here is a new try.
2013/7/29 Jameson <imntreal@gmail.com>:
What does cat /usr/lib/tmpfiles.d/apache.conf return?
stefan@archvm ~ $ sudo cat /usr/lib/tmpfiles.d/apache.conf d /run/httpd 0755 root root -
That seems to be the problem...
Override it. Copy it to /etc/tempfiles.d/ and edit it to fulfil your requirements.
participants (5)
-
Gaetan Bisson
-
Jameson
-
LANGLOIS Olivier PIS -EXT
-
Pedro Alejandro López-Valencia
-
Stefan Tatschner