Skip to content

Commit ca8191e

Browse files
committed
Fixed: FS#896 - Error.log of website must be accessible by ftp user
1 parent 4ad810b commit ca8191e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ function update($event_name,$data) {
538538
$this->_exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
539539
}
540540

541+
// Change the owner of the error log to the owner of the website
542+
if(!@is_file($data["new"]["document_root"]."/log/error.log")) exec('touch '.escapeshellcmd($data["new"]["document_root"])."/log/error.log");
543+
$this->_exec("chown $username:$groupname ".escapeshellcmd($data["new"]["document_root"])."/log/error.log");
544+
541545

542546
// Create the vhost config file
543547
$app->load('tpl');

0 commit comments

Comments
 (0)