UnexpectedValueException
The stream or file "/www/wwwroot/prototype.kuaizhanyun.com/storage/logs/laravel-2019-04-23.log" could not be opened: failed to open stream: Permission denied UnexpectedValueException thrown with message "The stream or file "/www/wwwroot/prototype.kuaizhanyun.com/storage/logs/laravel-2019-04-23.log" could not be opened: failed to open stream: Permission denied" Stacktrace: #11 UnexpectedValueException in /www/wwwroot/prototype.kuaizhanyun.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107 #10 Monolog\Handler\StreamHandler:write in /www/wwwroot/prototype.kuaizhanyun.com/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:119 #9 Monolog\Handler\RotatingFileHandler:write in /www/wwwroot/prototype.kuaizhanyun.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39 #8 Monolog\Handler\AbstractProcessingHandler:handle in /www/wwwroot/prototype.kuaizhanyun.com/vendor/monolog/monolog/src/Monolog/Logger.php:344 #7 Monolog\Logger:addRecord in /www/wwwroot/prototype.kuaizhanyun.com/vendor/monolog/monolog/src/Monolog/Logger.php:707 #6 Monolog\Logger:error in /www/wwwroot/prototype.kuaizhanyun.com/vendor/laravel/framework/src/Illuminate/Log/Logger.php:176 #5 Illuminate\Log\Logger:writeLog in /www/wwwroot/prototype.kuaizhanyun.com/vendor/laravel/framework/src/Illuminate/Log/Logger.php:87 #4 Illuminate\Log\Logger:error in /www/wwwroot/prototype.kuaizhanyun.com/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:498 #3 Illuminate\Log\LogManager:error in /www/wwwroot/prototype.kuaizhanyun.com/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:114 #2 Illuminate\Foundation\Exceptions\Handler:report in /www/wwwroot/prototype.kuaizhanyun.com/app/Exceptions/Handler.php:37 #1 App\Exceptions\Handler:report in /www/wwwroot/prototype.kuaizhanyun.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:81 #0 Illuminate\Foundation\Bootstrap\HandleExceptions:handleException in [internal]:0
11
UnexpectedValueException
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Handler
/
StreamHandler.php
107
10
Monolog
\
Handler
\
StreamHandler
write
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Handler
/
RotatingFileHandler.php
119
9
Monolog
\
Handler
\
RotatingFileHandler
write
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Handler
/
AbstractProcessingHandler.php
39
8
Monolog
\
Handler
\
AbstractProcessingHandler
handle
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Logger.php
344
7
Monolog
\
Logger
addRecord
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Logger.php
707
6
Monolog
\
Logger
error
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Log
/
Logger.php
176
5
Illuminate
\
Log
\
Logger
writeLog
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Log
/
Logger.php
87
4
Illuminate
\
Log
\
Logger
error
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Log
/
LogManager.php
498
3
Illuminate
\
Log
\
LogManager
error
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Exceptions
/
Handler.php
114
2
Illuminate
\
Foundation
\
Exceptions
\
Handler
report
/
app
/
Exceptions
/
Handler.php
37
1
App
\
Exceptions
\
Handler
report
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Bootstrap
/
HandleExceptions.php
81
0
Illuminate
\
Foundation
\
Bootstrap
\
HandleExceptions
handleException
[internal]
0
/
www
/
wwwroot
/
prototype.kuaizhanyun.com
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Handler
/
StreamHandler.php
    /**
     * {@inheritdoc}
     */
    protected function write(array $record)
    {
        if (!is_resource($this->stream)) {
            if (null === $this->url || '' === $this->url) {
                throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
            }
            $this->createDir();
            $this->errorMessage = null;
            set_error_handler(array($this, 'customErrorHandler'));
            $this->stream = fopen($this->url, 'a');
            if ($this->filePermission !== null) {
                @chmod($this->url, $this->filePermission);
            }
            restore_error_handler();
            if (!is_resource($this->stream)) {
                $this->stream = null;
                throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url));
            }
        }
 
        if ($this->useLocking) {
            // ignoring errors here, there's not much we can do about them
            flock($this->stream, LOCK_EX);
        }
 
        $this->streamWrite($this->stream, $record);
 
        if ($this->useLocking) {
            flock($this->stream, LOCK_UN);
        }
    }
 
    /**
     * Write to stream
     * @param resource $stream
     * @param array $record
     */
Arguments