Php 文件上的Laravel 5缓存不工作

Php 文件上的Laravel 5缓存不工作,php,caching,laravel-5,Php,Caching,Laravel 5,我有一台带有PHP5.6laravel 5centos 7.3ApacheHTTPD2.4的机器 我尝试使用laravelcacheconfig/cache.php: ... 'default' => env('CACHE_DRIVER', 'file'), ... 'file' => [ 'driver' => 'file', 'path' => storage_path('framework/cache'), ], ...

我有一台带有
PHP5.6
laravel 5
centos 7.3
ApacheHTTPD2.4
的机器

我尝试使用
laravel
cache
config/cache.php

...
'default' => env('CACHE_DRIVER', 'file'),
...
'file' => [
        'driver' => 'file',
        'path'   => storage_path('framework/cache'),
    ],
...
但是得到错误:

文件内容(/var/www/html/project/api/storage/framework/cache/7d/ab/7dabe30eba211b803662f3a2c48133024bb4aa18):无法打开流:没有此类文件或目录

手动创建文件时:

[user cache]$ mkdir 7d
[user cache]$ cd ./7d/ 
[user 7d]$ mkdir ab
[user cache]$ cd ./ab/
[user 7d]$ touch 7dabe30eba211b803662f3a2c48133024bb4aa18
然后获取权限问题

文件内容(/var/www/html/project/api/storage/framework/cache/7d/ab/7dabe30eba211b803662f3a2c48133024bb4aa18): 无法打开流:权限被拒绝

许可证:

[user api]$ stat -c "%a %n" ./storage/framework/cache/
777 ./storage/framework/cache/

[user api]$ ls -l./storage/framework/cache/
total 0
drwxrwxr-x. 3 user user 62 Feb  8 10:25 7d

您的系统上是否有一个可写文件夹
/var/www/html/project/api/storage/framework/cache/
?手动创建文件的代码是什么?您的Web服务器使用的用户是否与创建文件的cli相同?没有看到您对创建的文件应用任何文件权限,如
chown
chmod
。缓存文件夹具有777权限。Web服务器作为Apache用户工作。