Skip to content

Instantly share code, notes, and snippets.

@mehdichaouch
Last active September 30, 2018 22:31
Show Gist options
  • Save mehdichaouch/5ae0413886bfc0ae0613 to your computer and use it in GitHub Desktop.
Save mehdichaouch/5ae0413886bfc0ae0613 to your computer and use it in GitHub Desktop.
Script to fix Magento file permissions
#!/bin/bash
###############################
### Magento Permissions
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod o+w var var/.htaccess includes includes/config.php app/etc && chmod 550 pear && sudo find *.sh -type f -exec chmod 755 {} \;
rm -rf var/cache/*
rm -rf var/session/*
chown -R www-data:www-data var media
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment