Skip to content

Commit cbda300

Browse files
committed
Fixed: FS#431 - jailkit users cannot login
1 parent f06816d commit cbda300

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,13 @@ function update($event_name,$data) {
379379
}
380380

381381

382+
if($this->action == 'insert') {
383+
// Chown and chmod the directories below the document root
384+
exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
382385

383-
// Chown and chmod the directories
384-
exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"]));
386+
// The document root itself has to be owned by root
387+
exec("chown root:root ".escapeshellcmd($data["new"]["document_root"]));
388+
}
385389

386390
// make temp direcory writable for the apache user and the website user
387391
exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));

0 commit comments

Comments
 (0)