larave 5 could not be opened: failed to open stream: Permission denied
来源:互联网 发布:dw是什么软件 编辑:程序博客网 时间:2024/06/04 22:02
以前使用的是ubuntu系统,最近换了fedora用,LNMP下以前项目运行没问题,这次不行了,查看php-fpm(tail /var/log/php-fpm/www-error.log
)的错误日志如下:
[19-Nov-2015 13:52:42 Asia/Shanghai] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/usr/share/nginx/wakav/storage/logs/laravel-2015-11-19.log" could not be opened: failed to open stream: Permission denied' in /usr/share/nginx/wakav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87Stack trace:#0 /usr/share/nginx/wakav/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88): Monolog\Handler\StreamHandler->write(Array)#1 /usr/share/nginx/wakav/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): 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(400, 'exception 'Symf...', Array)#4 /usr/share/nginx/wakav/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(47): Monolog\Logger->error('exception 'Symf...') in /usr/share/nginx/wakav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87
后来请运维的高手看了下说是Selinux的问题,把Selinux关闭掉重启就好了。
查看Selinux状态:
1、
/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态SELinux status: enabled
2、getenforce
##也可以用这个命令检查(这个没试过)
关闭SELinux:
1、临时关闭(不用重启机器):
setenforce 0 ##设置SELinux 成为permissive模式 ##setenforce 1 设置SELinux 成为enforcing模式
2、修改配置文件需要重启机器:
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启系统即可
Author:leedaning
本文地址:http://blog.csdn.net/leedaning/article/details/49930989
0 0
- larave 5 could not be opened: failed to open stream: Permission denied
- PHP failed to open stream: Permission denied
- failed to open stream: Permission denied in
- ecshop商城: failed to open stream: Permission denied
- SAE failed to open stream: Permission denied in...
- <php+mysql>failed to open stream: Permission denied问题解决办法
- PHP Warning: file_put_contents(".."):failed to open stream: Permission denied in...
- Lamp环境下:fopen failed to open stream:permission denied
- file_get_contents failed to open stream: Permission denied in xxx解决办法
- the file “XXX” could not be opened because you don't have permission to view it
- the file “XXX” could not be opened because you don't have permission to view it
- the file “XXX” could not be opened because you don't have permission to view it
- the file “XXX” could not be opened because you don't have permission to view it
- the file “XXX” could not be opened because you don't have permission to view it
- the file “XXX” could not be opened because you don't have permission to view it
- failed to open stream: Permission denied in Unknown on line 0
- 【解决问题】'failed to open stream:Permission denied in......'在php出现情况总结
- IIS下使用fopen报错failed to open stream: Permission denied in的解决方法
- 欢迎使用CSDN-markdown编辑器
- gradle的使用,依赖管理
- android 修改system\build.prop
- android 中OnKeyDown的事件获取顺序
- Spring ContextLoaderListener与DispatcherServlet所加载的applicationContext的区别
- larave 5 could not be opened: failed to open stream: Permission denied
- java 基本型数据的默认值--有道笔记整理
- 开源图像检索工具:Caliph&Emir使用方法
- android broadcast--有道笔记整理
- 01背包 HDU 2602
- 使用暗码启动内置APK
- content:特征点和特征描述子
- VC++动态链接库编程之MFC DLL
- 面试时最常被问到的65个问题和技巧性回答(第一篇)