|
|
@@ -50,6 +50,7 @@ class FileEngine extends CacheEngine
|
|
|
* handy for deleting a complete group from cache.
|
|
|
* - `lock` Used by FileCache. Should files be locked before writing to them?
|
|
|
* - `mask` The mask used for created files
|
|
|
+ * - `dirMask` The mask used for created folders
|
|
|
* - `path` Path to where cachefiles should be saved. Defaults to system's temp dir.
|
|
|
* - `prefix` Prepended to all entries. Good for when you need to share a keyspace
|
|
|
* with either another cache config or another application.
|
|
|
@@ -63,6 +64,7 @@ class FileEngine extends CacheEngine
|
|
|
'groups' => [],
|
|
|
'lock' => true,
|
|
|
'mask' => 0664,
|
|
|
+ 'dirMask' => 0770,
|
|
|
'path' => null,
|
|
|
'prefix' => 'cake_',
|
|
|
'serialize' => true,
|
|
|
@@ -371,7 +373,7 @@ class FileEngine extends CacheEngine
|
|
|
$dir = $this->_config['path'] . $groups;
|
|
|
|
|
|
if (!is_dir($dir)) {
|
|
|
- mkdir($dir, 0775, true);
|
|
|
+ mkdir($dir, $this->_config['dirMask'], true);
|
|
|
}
|
|
|
|
|
|
$path = new SplFileInfo($dir . $key);
|
|
|
@@ -418,7 +420,7 @@ class FileEngine extends CacheEngine
|
|
|
$success = true;
|
|
|
if (!is_dir($path)) {
|
|
|
// phpcs:disable
|
|
|
- $success = @mkdir($path, 0775, true);
|
|
|
+ $success = @mkdir($path, $this->_config['dirMask'], true);
|
|
|
// phpcs:enable
|
|
|
}
|
|
|
|