Monday, 15 July 2019

Magento 2 folder/file permissions command line

You should set as bellow recommended.

cd <your Magento install dir>

find . -type f -exec chmod 644 {} \;                        // 644 permission for files

find . -type d -exec chmod 755 {} \;                        // 755 permission for directory

find ./var -type d -exec chmod 777 {} \;                // 777 permission for var folder   

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

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

chmod 777 ./app/etc

chmod 644 ./app/etc/*.xml

chown -R :<web server group> .

No comments:

Post a Comment