diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index 30a51595e759..d7e3a2e21c1e 100755 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -28,7 +28,7 @@ class FileStore implements Store /** * Octal representation of the cache file permissions. * - * @var int + * @var int|null */ protected $filePermission; @@ -44,7 +44,7 @@ public function __construct(Filesystem $files, $directory, $filePermission = nul { $this->files = $files; $this->directory = $directory; - $this->filePermission = $filePermission ?? 0775; + $this->filePermission = $filePermission; } /** @@ -75,7 +75,9 @@ public function put($key, $value, $seconds) ); if ($result !== false && $result > 0) { - $this->files->chmod($path, $this->filePermission); + if (! is_null($this->filePermission)) { + $this->files->chmod($path, $this->filePermission); + } return true; }