diff --git a/RoboFile.dist.ini b/RoboFile.dist.ini index b2da1fa..7586ede 100644 --- a/RoboFile.dist.ini +++ b/RoboFile.dist.ini @@ -8,3 +8,6 @@ cmsPath = tests/joomla-cms3 ; If you want to clone a different branch, you can set it here branch = staging + +; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here. +localUser = www-data diff --git a/RoboFile.php b/RoboFile.php index ea6d4d4..1e78044 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -191,6 +191,13 @@ class RoboFile extends \Robo\Tasks } $this->_copyDir('tests/cache', $this->cmsPath); + + // Optionally change owner to fix permissions issues + if (!empty($this->configuration->localUser) && !$this->isWindows()) + { + $this->_exec('chown -R ' . $this->configuration->localUser . ' ' . $this->cmsPath); + } + $this->say('Joomla CMS site created at ' . $this->cmsPath); // Optionally uses Joomla default htaccess file. Used by TravisCI