Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Magento 2 - Apply default permissions
function m2_apply_permissions() {
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 755 {} \;
find ./pub/media -type d -exec chmod 755 {} \;
find ./pub/static -type f -exec chmod 644 {} \;
find ./pub/static -type d -exec chmod 755 {} \;
chmod 755 ./app/etc
chmod 644 ./app/etc/*.xml
chmod u+x bin/magento
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.