Skip to content

Commit 246d709

Browse files
committed
Merge pull request #34 from tommygnr/32-fix-file-permissions
Set cache files to be world readable
2 parents 318c514 + db49193 commit 246d709

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Metadata/Cache/FileCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function putClassMetadataInCache(ClassMetadata $metadata)
4242

4343
$tmpFile = tempnam($this->dir, 'metadata-cache');
4444
file_put_contents($tmpFile, '<?php return unserialize('.var_export(serialize($metadata), true).');');
45+
chmod($tmpFile, 0666 & ~umask());
4546

4647
if (false === @rename($tmpFile, $path)) {
4748
throw new \RuntimeException(sprintf('Could not write new cache file to %s.', $path));

0 commit comments

Comments
 (0)