【问题标题】:Magento2 Cache files 403 Forbidden?Magento2缓存文件403禁止?
【发布时间】:2016-03-23 09:10:59
【问题描述】:

请注意,一旦创建了新的缓存文件夹,它就会变成 403 Forbidden。如何在 Magento2 上解决这个问题?

如果我运行此命令,它将暂时起作用,直到创建新的缓存文件夹并且结果再次被 403 禁止。

find . -type d -print0 | xargs -0 chmod 755

【问题讨论】:

  • Stack Overflow 是一个programming-related 问答网站。您的问题与编程无关。也许你应该把它发到magento.stackexchange.com 上?
  • 请将解决方案放在回答帖子中,而不是在问题中。用你自己的话总结解决方案,不要只是链接。

标签: magento magento2


【解决方案1】:

这是一个与权限、用户和组有关的问题(正如this 3d 中关于类似问题所指出的那样)。

解决办法是set in your httpd.conf file the Apache user:

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User Aerendir
Group staff

其他有用的资源:

【讨论】:

    【解决方案2】:

    清理缓存后,只需在 Shell/终端中运行以下命令即可。

    chmod 777 -R var/
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-17
      • 2018-05-17
      • 2016-05-19
      • 1970-01-01
      • 2013-06-09
      • 2015-04-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多