Skip to content

Commit

Permalink
Fix group
Browse files Browse the repository at this point in the history
  • Loading branch information
xrow committed Sep 2, 2015
1 parent 2b63fc9 commit 2f38bdf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/xrow/eZCluster/CloudSDK.php
Expand Up @@ -10,6 +10,7 @@ class CloudSDK
{
const SITES_ROOT = '/var/www/sites';
const USER = 'ec2-user';
const GROUP = 'apache';
public static $ezcTemplateConfiguration;
const CONFIG_FILE = '/etc/ezcluster/ezcluster.xml';
const XML_NAMESPACE = 'http://www.xrow.com/schema/ezcluster';
Expand Down
2 changes: 1 addition & 1 deletion src/xrow/eZCluster/ClusterNode.php
Expand Up @@ -568,7 +568,7 @@ public function setupMounts()
+auto.master\n");
chmod("/etc/auto.master", 0755);
chown("/etc/auto.master", CloudSDK::USER);
chgrp("/etc/auto.master", CloudSDK::USER);
chgrp("/etc/auto.master", CloudSDK::GROUP);
$mounts = array();
if (is_array($result)) {
foreach ($result as $environment) {
Expand Down
4 changes: 2 additions & 2 deletions src/xrow/eZCluster/ClusterTools.php
Expand Up @@ -351,7 +351,7 @@ static public function isDateTimeinRange( $range, DateTime $dt = null )
return false;
}

static public function mkdir( $dir, $user = false, $permissions = 0775 )
static public function mkdir( $dir, $user = false, $permissions = 0775, $group = CloudSDK::GROUP )
{
if ( is_dir( $dir ) )
{
Expand All @@ -362,7 +362,7 @@ static public function mkdir( $dir, $user = false, $permissions = 0775 )
if ( $user !== false )
{
chown( $dir, $user );
chgrp( $dir, $user );
chgrp( $dir, $group );
}
umask($old);
}
Expand Down
6 changes: 3 additions & 3 deletions src/xrow/eZCluster/Resources/environment.php
Expand Up @@ -226,7 +226,7 @@ public function getVHost()
if (! file_exists($dir)) {
mkdir($dir, 0777, true);
chown($dir, CloudSDK::USER);
chgrp($dir, CloudSDK::USER);
chgrp($dir, CloudSDK::GROUP);
}
$vhost->name = $this->name;
$vhost->hosts = array();
Expand Down Expand Up @@ -324,7 +324,7 @@ public function setup()
$script = (string) $this->environment["script"];
chmod($this->dirtmp, 0777);
chown($this->dirtmp, CloudSDK::USER);
chgrp($this->dirtmp, CloudSDK::USER);
chgrp($this->dirtmp, CloudSDK::GROUP);

//checkout & execute
if (! empty($this->parameters["SCM"]) and empty($script) and empty( $bootstrap_script )) {
Expand Down Expand Up @@ -385,7 +385,7 @@ public function setup()
}
chmod($this->dirtmp, 0777);
chown($this->dirtmp, CloudSDK::USER);
chgrp($this->dirtmp, CloudSDK::USER);
chgrp($this->dirtmp, CloudSDK::GROUP);
ClusterTools::mkdir($this->docroottmp, CloudSDK::USER, 0777);
try {
$fs->rename( $this->dir, $this->dir. ".new" );
Expand Down

0 comments on commit 2f38bdf

Please sign in to comment.