Files and folder permissions to run magento2

February 12, 2016
Posted by admin 2:39 AM

 Permissions needed to run magento2 


Before running magento on server we need to set several permission 

on server otherwise the site will give Internal server error due to insuffecient permission of

folders and files.

Below are the permission which we can set for Magento files and folders to run Magento2.


1. For files we need below permission 

   find . -type f -exec chmod 644 {} ;    


2. For folders we need below permission

  find . -type d -exec chmod 755 {} ;   


3. For var folder                      

  find ./var -type d -exec chmod 777 {} ;               


4. For pub/media folder and static folder   

  find ./pub/media -type d -exec chmod 777 {} ;

  find ./pub/static -type d -exec chmod 777 {};