Skip to content

Commit

Permalink
set fileperms to 0640 on generate/deploy, refs #27
Browse files Browse the repository at this point in the history
  • Loading branch information
graste committed Aug 29, 2016
1 parent 654ef7b commit 8bb45e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/CodeGen/ClassBuilder/BuildCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BuildCache extends Object

const DIR_MODE = 0750;

const FILE_MODE = 0750;
const FILE_MODE = 0640;

protected $cache_directory;

Expand Down Expand Up @@ -91,11 +91,13 @@ protected function generateFiles(ClassContainerList $class_containers)
}

$class_filepath = $package_dir . DIRECTORY_SEPARATOR . $class_container->getFileName();
$this->file_system->dumpFile($class_filepath, $class_container->getSourceCode(), self::FILE_MODE);
$this->file_system->dumpFile($class_filepath, $class_container->getSourceCode());
$this->file_system->chmod($class_filepath, self::FILE_MODE);
$checksum .= md5_file($class_filepath);
}
$checksum_file = $this->cache_directory . DIRECTORY_SEPARATOR . self::CHECKSUM_FILE;
$this->file_system->dumpFile($checksum_file, md5($checksum), self::FILE_MODE);
$this->file_system->dumpFile($checksum_file, md5($checksum));
$this->file_system->chmod($checksum_file, self::FILE_MODE);
}

protected function deployFiles(ClassContainerList $class_containers, $method = 'move')
Expand All @@ -122,6 +124,7 @@ protected function deployFiles(ClassContainerList $class_containers, $method = '
} else {
$this->file_system->copy($cache_filepath, $deploy_filepath, true);
}
$this->file_system->chmod($deploy_filepath, self::FILE_MODE);
}
}
}
Expand Down

0 comments on commit 8bb45e4

Please sign in to comment.