Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Magento Permissions
#Set Magento root directory permissions. Call using the following:
# curl -sL https://goo.gl/b1NkHW | sudo bash
#!/bin/bash
if [ ! -f ./app/etc/local.xml ]; then
echo "-- ERROR"
echo "-- This doesn't look like a Magento install. Please make sure"
echo "-- that you are running this from the Magento main doc root dir"
exit
fi
if [ `id -u` != 0 ]; then
echo "-- ERROR"
echo "-- This script should be run as root so that file ownership"
echo "-- changes can be set correctly"
exit
fi
find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 755 {} \;
find ./var -type d \-exec chmod 777 {} \;
find ./var -type f \-exec chmod 666 {} \;
find ./media -type d \-exec chmod 777 {} \;
find ./media -type f \-exec chmod 666 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
# Set Magento root directory permissions. Call using the following:
# curl -sL https://goo.gl/B5xdks | sudo bash
#!/bin/bash
find . -type d -exec chmod 700 {} \;
find . -type f -exec chmod 600 {} \;
@philipvas

This comment has been minimized.

Copy link

commented Sep 30, 2015

magento connect permissions break magento 1.9 - 403 forbidden access error in apache for me.

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.