Skip to content

Commit

Permalink
Merge pull request #257 from gregumo/master
Browse files Browse the repository at this point in the history
Change temporarily umask for 777 chmod and allow www-data user manipu…
  • Loading branch information
paulandrieux committed Oct 29, 2015
2 parents 57733e6 + a69e322 commit 0635eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Bundle/CoreBundle/Builder/ViewCssBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ private function getViewCssFileFromHash($hash)
*/
private function writeCssFile(View $view, $css)
{
$oldmask = umask(0);
if (!is_dir($this->viewCssDir)) {
mkdir($this->viewCssDir, 0777, true);
}
$file = $this->getViewCssFile($view);
file_put_contents($file, $css);
umask($oldmask);
}
}

0 comments on commit 0635eca

Please sign in to comment.