Skip to content

Instantly share code, notes, and snippets.

@OdinsHat
Created June 1, 2015 13:43
Show Gist options
  • Save OdinsHat/62b31c11f6962ab95b08 to your computer and use it in GitHub Desktop.
Save OdinsHat/62b31c11f6962ab95b08 to your computer and use it in GitHub Desktop.
Reset the Magento permissions on a Debian or Ubuntu box assuming run in root of Mage dir
#!/bin/sh
chown -R www-data .
find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \;
find var/ -type f -exec chmod 600 {} \;
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \;
find media/ -type d -exec chmod 700 {} \;
chmod 700 includes
chmod 600 includes/config.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment