Search code examples
magentopermissionsmagento-1.9filezilla

Magento error after I changed the permissions


I changed the permissions of my Magento website, so now it doesn't work. I used FileZilla and I setted the permission of all files and folders to "777", and then I changed them to "750". After I did that, the front-end gives me an error.

There is a way to set correctly all files and folders permissions?

PS: FileZilla is very slow when it change the permission, so I lost days trying the right permissions' combination.


Solution

  • The source of your error on the frontend is almost guaranteed to the inability to write to var or media, so try setting var and media recursively to 777 and see if that fixes it. Then try 775, and go as tight on perms as you can without seeing the error.

    Here are some instructions to reset all of your perms back to normal if that doesn't work.

    Do you have SSH credentials? If so, you can run this in CLI and it will fix the issue most likely. These are the Magento recommended permission settings:

    find . -type f -exec chmod 644 {} \;
    find . -type d -exec chmod 755 {} \;
    chmod 550 pear
    chmod 550 mage #for magento 1.5+
    

    then give your var and media folder enough write permissions so that the web server can access them. Something like 775 or something should work, but you can do 777 and work your way backwards.