
Hi Guys, Just a quick article to set up correct folder and files permission on Magento. All the files to be set with 664 and folders to be set with 775. You need to have root access or sudo access to run the following commands -:
Login to the box and go to the path where magento is installed and run the following commands -:
find -type d -exec chmod 755 '{}' \;
find -type f -exec chmod 664 '{}' \;
The above commands will make sure that all the top level permissions have been set properly. Next you need to make sure var and media directories has write permission because most of the files will be written in these two folders. So now to give them write permission then use the following commands -:
cd media
find -type d -exec chmod 775 '{}' \;
cd var
find -type d -exec chmod 775 '{}' \;
The above would be enough to make magento up and running as basic. You might need to run the following commands if you have AITOC modules installed -:
cd app\code\local
chmod 777 Aitoc
cd Aitoc
find -type d -exec chmod 777 '{}' \;
find -type f -exec chmod 777 '{}' \;
cd app\code\local
chmod 777 AdjustWare
cd AdjustWare
find -type d -exec chmod 777 '{}' \;
find -type f -exec chmod 777 '{}' \;
cd app\etc\modules
chmod 777 Aitoc_*.xml
chmod 777 AdjustWare_*.xml
The above will sort out all the permission problems with Magento installation. If you are using Magento 2 then follow this link to set correct files and folder permission on Magento 2. Hope this article helped you in some way. Please leave us your comment and let us know what do you think? Thanks.


