I got message for error_log file "The stream or file ".../laravel.log" could not be opened: failed to open stream: Permission denied"

Sangwondee

Tue Jun 20 13:17:41.195156 2017] [:error] [pid 14454] [client 203.131.216.144:60475]

PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in

/var/www/html/app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107\nStack trace:\n#0

/var/www/html/app/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)\n#1

/var/www/html/app/vendor/monolog/monolog/src/Monolog/Logger.php(336): Monolog\Handler\AbstractProcessingHandler->handle(Array)\n#2

/var/www/html/app/vendor/monolog/monolog/src/Monolog/Logger.php(615): Monolog\Logger->addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#3

/var/www/html/app/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#4

/var/www/html/app/vendor/laravel/framework/src/Illuminate/Log/Writer.php(113): Illuminate\Log\Writer->writeLog('er in

/var/www/html/app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107, referer: http://203.131.209.179/app/login

Alexey Mezenin

Directory Permissions

After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run.

https://laravel.com/docs/5.4/installation#installing-laravel

So, for example, in Linux you can do this by executing chmod command:

chmod -R 755 storage bootstrap/cache

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I get phpunit to not swallow error_log output?

error_log message is truncated when using print_r

Laravel classloader.php error failed to open stream: No such file or directory

Why is Wordpress creating a giant error_log file?

Laravel logs to error_log?

The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

Laravel The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

Laravel & Docker: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

failed to open stream: No such file or directory (Laravel)

How do I write a message timestamp to a log file?

How to set different path for php error_log file?

laravel-2019-06-24.log" could not be opened: failed to open stream: Permission denied

"storage/logs/laravel-2019-11-22.log" could not be opened: failed to open stream: Permission denied

The stream or file "/app/storage/logs/laravel.log" could not be opened: failed to open stream:Permission denied

Unable to get log message in the error.log file APACHE Module?

PHP - fopen log_post.txt failed to open stream: no such file or directory

i got error message while retrieve nodes

Clear error_log file with PHP

How to log an PHP error_log error message to Apache server error_log?

I got "Not in scope SortOn" error message

error message include_path, failed to open stream: No such file or directory on shared hosting

How can I exit a multi-line shell script, on fail, and still log the error stream to a file?

xampp ubuntu laravel The stream or file "/storage/logs/laravel log" could not be opened: failed to open stream: Permission denied

I got a error message tryinh to install Prokka

Why do I got "You did not select a file to upload." error message when I did it?

Piping got.stream to a file

The stream or file "...\storage\logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied

The stream or file "/var/app/current/storage/logs/laravel.log"

I want to log every message from one server to one file but i gets error