-
安装完
Laravel
,运行项目之后,报错:The stream or file "/usr/local/var/laravel-test/dcat/storage/logs/laravel-2021-06-15.log" could not be opened in append mode: failed to open stream: Permission denied
-
正常安装完
Laravel
后,需要给这两个文件配置读写权限:storage
目录和bootstrap/cache
目录,我是全部一块加上。 -
操作流程
1、进入项目当前文件夹,例如
/project/test
,test
是项目文件夹。$ cd /project
2、添加权限
$ chmod -R 777 test
附:如果报错
chmod: Unable to change file mode on laravel-test/storage/framework/views/eef325e700d1864421506922200f7548a0f32fd8.php: Operation not permitted
,我这里是直接删除了这种文件,一看估计就是个缓存文件,然后重新添加权限
PHP - Laravel The stream or file “/storage/logs/.“ could not be opened in append
最新推荐文章于 2022-07-09 09:35:36 发布