I am setting up a Magento 2.2.5 instance on a production environment (single-user / shared hosting). When it comes to file permissions, I found two documentation pages:
- https://devdocs.magento.com/guides/v2.2/install-gde/prereq/file-system-perms.html
- https://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_file-sys-perms.html
When following the instructions for a shared hosting environment at the first link, everything is fine. But, I assumed I had to follow the instructions at the second link as well since I am configuring a production environment. As soon as I run the command to "Make code files and directories read-only", I get an error like this: Backend fatal error: PHP Fatal error: Uncaught Zend_Cache_Exception, because cache_dir var/page_cache is not writable.
This seems logical since the command made var read-only.
So, is the documentation wrong? Or should I somehow only follow the documentation at the first link, not the second?