/**
  * Change directory owners.
  *
  * @param Domain $domain
  *
  * @return bool
  */
 protected function _changeDirectoryOwner(Domain $domain)
 {
     $fs = new Filesystem();
     try {
         $fs->chown($domain->getPath(), self::_root);
         // Domain Root
         $fs->chgrp($domain->getPath(), $domain->getUser()->getGroupname(), true);
         // Domain Root + Child
         // Child directories
         $fs->chown($this->_getDefaultDirs($domain->getPath()), $domain->getUser()->getName(), true);
     } catch (IOException $e) {
         return false;
     }
     return true;
 }
Exemple #2
0
 /**
  * SuexecUserGroup
  *
  * @return string
  */
 public function getSuexecUserGroup()
 {
     return sprintf('%s %s', $this->domain->getUser()->getName(), $this->domain->getUser()->getGroupname());
 }
 /**
  * Get PHP-FPM Socket.
  *
  * @param Domain $domain
  *
  * @return string
  */
 public function getPhpSocket(Domain $domain)
 {
     $socket = $this->getPhpFpmConfigBuilder()->getPoolCreator($domain->getUser())->getSocketPath();
     return $socket;
 }