【问题标题】:How to run Laravel 4 on Google Compute Engine如何在 Google Compute Engine 上运行 Laravel 4
【发布时间】:2016-06-19 20:12:50
【问题描述】:

如何为 Laravel 4 设置存储目录权限。 我有这个错误:

`Error in exception handler: The stream or file "/var/www/mysite/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/mysite/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:84`    

我已经 chmod -R 将存储目录改为 777。问题仍然存在。 有什么想法吗?

【问题讨论】:

  • 你递归chmod了吗? sudo chmod 777 -R storage
  • 是的,已确认。一切都变绿了:drwxrwxrwx。 2 apache apache 45 Mar 6 06:42 日志
  • 看到这个,看起来很像stackoverflow.com/questions/23411520/…
  • 好的,我发现这也发生在 joomla 上。我无法写入 configuration.php。它与网络服务器用户特权有关。顺便说一句,我使用的是 CentOS 7,其中 apache 作为网络用户。会尝试看看这个问题。
  • 最后,它与 SELinux 的 CentOS 问题。这是解决方案:blog.lysender.com/2015/07/…

标签: laravel laravel-4


【解决方案1】:

它与 Laravel 或 Google Compute Engine 无关。 它是 Centos 7 附带的 SELinux 配置。 必须调整或禁用 SELinux 才能解决此问题。

【讨论】:

    猜你喜欢
    • 2013-12-24
    • 2017-08-11
    • 2019-02-02
    • 2018-05-07
    • 2020-11-17
    • 2022-01-01
    • 1970-01-01
    • 2017-12-08
    相关资源
    最近更新 更多