Last active
October 1, 2015 15:58
-
-
Save kpheasey/86bfc4625a236e3fe211 to your computer and use it in GitHub Desktop.
Magento Permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
magento connect permissions break magento 1.9 - 403 forbidden access error in apache for me.