From cbda30058c0f61ae2afbd9085afcf841f32751a5 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 27 Jan 2009 11:50:52 -0500
Subject: [PATCH] Fixed: FS#431 - jailkit users cannot login
---
server/plugins-available/apache2_plugin.inc.php | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1c7b918..1aef9f1 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -379,9 +379,13 @@
}
+ if($this->action == 'insert') {
+ // Chown and chmod the directories below the document root
+ exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
- // Chown and chmod the directories
- exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
+ // The document root itself has to be owned by root
+ exec("chown root:root ".escapeshellcmd($data["new"]["document_root"]));
+ }
// make temp direcory writable for the apache user and the website user
exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
--
Gitblit v1.9.1