For some reason, I'm having issues with a fresh install of M2, though, things seem to sort themselves out if I update the file and folder permissions on the server.

Unfortuntely, if I re-deploy the static content, or flush the cache, I need to re-update the folder permissions on the server.

Has anyone else experienced the same issue?

2 Answers 2


You might be rebuilding static-content/flushing cache as root. Make a magento file owner user and chown the install to that user, in your apache group. Then do all your bin/magento tasks as that user.


Try using magento default file/folder permissons:

find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
  • I can't use 770 and 660 on my server, as it shows that I don't have permission to view the site in the browser. Instead, I've been using 755 and 644, which shows the site but I then have to reset the permissions any time I make a change to the site.
    – MikeMason
    Apr 25, 2016 at 11:04
  • This is from magento devdocs provide this command for set file folder permissions. Apr 25, 2016 at 11:04
  • Magento is currently re implementing how we set file permissions in code. Until we change it though, you either have to use 770/660 or continue to reset permissions as you are doing now. Whenever Magento writes files, we set them with 770/660 permissions. Apr 26, 2016 at 13:28

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.