From ba733a3269903c3a9260fc7127513cb46ed69e8c Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Wed, 24 Aug 2016 00:28:10 +0200 Subject: [PATCH] Change permission of httpd.pid file. Add read, write and execute rights for group. As the owner of the pid file is root, users get a problem if they have set their umask to 067, cause they no longer have the right to read the file and thus the included process id. As such the server will not be killed. --- includes/Clamp/ApacheCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Clamp/ApacheCommand.php b/includes/Clamp/ApacheCommand.php index 88c1113..3cc1a6b 100644 --- a/includes/Clamp/ApacheCommand.php +++ b/includes/Clamp/ApacheCommand.php @@ -14,6 +14,7 @@ public function executeStart(array $args = array(), array $options = array()) $this->preparePaths($options); exec($this->getConfig('$.apache.commands.httpd') . ' -f /dev/null ' . $this->buildParameters($options) . ' > /dev/null &'); $this->waitFor($this->getPath($options['pidfile'])); + exec('sudo chmod g+rwx ' . $this->getPath($options['pidfile'])); $this->writeln('Apache server started', ConsoleKit\Colors::GREEN); } else { @@ -32,4 +33,4 @@ public function executeStop(array $args = array(), array $options = array()) $this->writeln('Apache server is not running', ConsoleKit\Colors::YELLOW); } } -} \ No newline at end of file +}