Magento2缓存文件403禁止?

时间:2015-12-17 02:04:06

标签: magento magento2

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

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

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

2 个答案:

答案 0 :(得分:0)

这是与权限,用户和群组相关的问题(在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

其他有用的资源:

答案 1 :(得分:-1)

清理缓存后,只需在Shell / terminal中运行以下命令。

chmod 777 -R var/