Magento-错误的日志文件路径

时间:2019-04-13 11:14:09

标签: magento2 monolog

我正在修复Magento中的一个问题,并且找到了运行建议

composer update

setup:upgrade 

此后,我因错误的日志文件路径而出错:

/var/www/html//var/log/system.log

我在var / log / exception.log中发现了此错误

The stream or file "/var/www/html//var/log/system.log" could not be opened:
 failed to open stream: Permission denied {"exception":"[object] 
(UnexpectedValueException(code: 0): The stream or file 
\"/var/www/html//var/log/system.log\" could not be opened: failed to open
 stream: Permission denied at 
/var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107)"
} []

1 个答案:

答案 0 :(得分:0)

您是否检查了/var/log/system.log目录中/var/www/html文件的权限?

Permission denied表示该文件不可访问。

该文件必须具有0664权限,PHP才能写入该文件。