您好我将我的laravel4脚本从我的笔记本部署到自己的VPS服务器上,并通过git使用CentOS7。我对存储文件夹的许可有问题。我得到了错误
file_put_contents(/var/www/myweb/app/storage/views/0353b2081a97162a6d5fdda4c3a3f918): failed to
开放流:权限被拒绝
我通过此
尝试更改存储目录的权限 cd app/
chown -R apache:apache storage
cd storage/
find . -type d -exec chmod 775 {} \; && find . -type f -exec chmod 664 {} \;
但错误仍然相同。我如何设置permisiion以解决CentOS 7上的这个问题?
答案 0 :(得分:0)
这是一个老帖子,但仍然......
这似乎是一个selinux问题。
我在/ opt / web / myapp中安装了我的Laravel应用程序,并完成了mardon所做的所有步骤。没有运气。
然后我做了sudo setenforce Permissive
并且它有效。
经过几次测试后,我会用适当的selinux标签回来。