2

Notice that once new cache folder created, it will turn out to be 403 Forbidden. How do I solve this on Magento2?

If I ran this command, it will work for temporary till new cache folder created and it turn out to be 403 forbidden again.

find . -type d -print0 | xargs -0 chmod 755
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Eric T
  • 1,026
  • 3
  • 20
  • 42
  • Stack Overflow is a [programming-related](http://stackoverflow.com/help/on-topic) Q&A site. Your question is not about programming. Perhaps you should post it on http://magento.stackexchange.com instead? – Enigmativity Dec 17 '15 at 06:48
  • Please put solutions in an *answer post*, not in the question. Summarise the solution in your own words, don't just link. – Martijn Pieters Feb 29 '16 at 10:40

2 Answers2

1

This is an issue related to permissions, users and groups (as also pointed out in this 3d about a similar problem).

The solution is to 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

Other useful resources:

Community
  • 1
  • 1
Aerendir
  • 6,152
  • 9
  • 55
  • 108
-1

Just run following command in Shell/terminal after cleaning cache.

chmod 777 -R var/
FelixSFD
  • 6,052
  • 10
  • 43
  • 117