I would want to know which permissions i must set in the Magento2 setup and after the install.

Special mention in var/generations, that at the end i must put it in 777 or I'll never can install it.

1 Answer 1


Please, check the following links to set the permission properly:

http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache-user.html

Just for summary: Magento team suggest to set the file permissions to 660, the directory ones to 770. It's can be done in the following way

sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento

Also, to improve the security of the site you may run your Magento instance by non-root owner. Here is helpful answers form a post with the same theme:

Magento 2 folder/file permissions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.