Update ApacheWebsiteCreate.php

This commit is contained in:
Bozhidar Slaveykov 2024-04-03 16:28:40 +03:00
parent bc7c932770
commit 2a33895a33

View file

@ -49,7 +49,9 @@ class ApacheWebsiteCreate
}
$domainRoot = '/home/' . $this->user . '/domains/' . $this->domain;
$allDomainsRoot = '/home/'.$this->user.'/domains';
$domainRoot = '/home/'.$this->user.'/domains/'.$this->domain;
$homeRoot = '/home/'.$this->user;
//copy php suexe to {'home'}/fcgi-bin
@ -90,9 +92,15 @@ class ApacheWebsiteCreate
$fileManagerApi->filePutContents($settings['domainPublic'] . '/index.php', $indexContent);
ShellApi::exec('chown -R ' . $settings['user'] . ':' . $settings['group'] . ' ' . $allDomainsRoot);
ShellApi::exec('chown -R ' . $settings['user'] . ':' . $settings['group'] . ' ' . $homeRoot);
ShellApi::exec('chown -R ' . $settings['user'] . ':' . $settings['group'] . ' ' . $settings['domainRoot']);
ShellApi::exec('chown -R ' . $settings['user'] . ':' . $settings['group'] . ' ' . $settings['domainPublic']);
ShellApi::exec('chmod -R 755 ' . $allDomainsRoot);
ShellApi::exec('chmod -R 755 ' . $homeRoot);
ShellApi::exec('chmod -R 755 ' . $settings['domainRoot']);
ShellApi::exec('chmod -R 755 ' . $settings['domainPublic']);