Larave 5 could not is opened:failed to open stream:permission denied_laravel

Source: Internet
Author: User
Tags fpm stack trace

Previously used Ubuntu system, recently changed fedora, LNMP under the previous project run no problem, this time, check PHP-FPM (tail/var/log/php-fpm/www-error.log) error log as follows:

[19-nov-2015 13:52:42 Asia/shanghai] PHP Fatal error:uncaught exception ' unexpectedvalueexception ' with message ' the stream or file '/usr/share/nginx/wakav/s Torage/logs/laravel-2015-11-19.log "Could not is opened:failed to open stream:permission denied ' In/usr/share/nginx/wak Av/vendor/monolog/monolog/src/monolog/handler/streamhandler.php:87 Stack Trace: #0/usr/share/nginx/wakav/vendor/
monolog/monolog/src/monolog/handler/rotatingfilehandler.php (): Monolog\handler\streamhandler->write (Array) #1/usr/share/nginx/wakav/vendor/monolog/monolog/src/monolog/handler/abstractprocessinghandler.php (Panax): Monolog\ Handler\rotatingfilehandler->write (Array) #2/usr/share/nginx/wakav/vendor/monolog/monolog/src/monolog/ logger.php (289): Monolog\handler\abstractprocessinghandler->handle (Array) #3/usr/share/nginx/wakav/vendor/ monolog/monolog/src/monolog/logger.php (565): Monolog\logger->addrecord (Exception ' symf ... ', Array) #4/usr/ Share/nginx/wakav/vendor/laravel/framework/src/illUminate/foundation/exceptions/handler.php ($): Monolog\logger->error (' exception ' SYMF ... ') in/usr/share/nginx/
 Wakav/vendor/monolog/monolog/src/monolog/handler/streamhandler.php on line 87

Later, please see the Master of the operation of the SELinux is said to be a problem, the selinux shut down to restart the good.
To view the SELinux status:
1,

/usr/sbin/sestatus-v      # #如果SELinux Status parameter is enabled and is open

SELinux status:                 Enabled

2, Getenforce # #也可以用这个命令检查 (This has not been tried)

Close SELinux:

1, temporarily shut down (do not restart the machine):

Setenforce 0                  # #设置SELinux become permissive Mode

    # #setenforce 1 set SELinux become enforcing mode

2, modify the configuration file needs to reboot the machine:

modifying/etc/selinux/config files

Change Selinux=enforcing to Selinux=disabled

Reboot the system

Author:leedaning
This article address: http://blog.csdn.net/leedaning/article/details/49930989

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.