Skip to content

Commit

Permalink
Set open permissions on created directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hall committed Jan 23, 2018
1 parent 2eefcce commit bf0f73a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/RWFileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ protected function getFilePathFromKey($key)
}
}

if (!is_readable($directoryToCreate) || !is_writable($directoryToCreate)) {
chmod($directoryToCreate, 0777);
}

$filePath = $this->config['cacheDirectory'].$key.'.'.$this->config['fileExtension'];

return $filePath;
Expand Down

0 comments on commit bf0f73a

Please sign in to comment.