Skip to content

Instantly share code, notes, and snippets.

@mgeoffray
Created January 15, 2017 18:19
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