A fix: Magento Frontend and/or Admin and/ or Admin menu doesn’t work

Introduction

After a magento upgrade, the frontend died a tragic death – a 500 Internal Server Error. Once I got that running, I figured out why I was getting the same error in the admin backend, and then once all that was sorted – my admin menu links weren’t working!

Solution

Turns out my hosting server was kicking me out – because of excessive permissions on my index.php file. They also said I had some directories that had some excessive permissions. Whoops. Guess they’ve gotten wise to the old “Just allow everybody to do everyting!” trick of adding world write permission everywhere. (Ditto for eXecute permission, too, which seems excessively silly even to me).

Here are the files in question, in your magento home directory:

./index.php
./js/index.php
./downloader/index.php

All of these files should be chmod’d to 644. Once that was done, my hosting provider was much happier and magento went merrily about its business.

As for the rest of the code, I found a few directories that didn’t have the correct permission (at least in my opinion). There are quite a few subdirectories in magento, and only these few had different permission:

drwxrwxrwx 2  ./Mage/Adminhtml/Model/System/Config/Backend/Email
drwxrwxrwx 2  ./Mage/Adminhtml/Block/Report/Product/Downloads/Renderer
drwxrwxrwx 2  ./Mage/Bundle/Model/Mysql4/Price
drwxrwxrwx 2  ./Mage/Bundle/Model/Price
drwxrwxrwx 3  ./Mage/Page/Model
drwxrwxrwx 2  ./Mage/Page/Model/Source
drwxrwxrwx 2  ./Mage/Log/Model/Mysql4/Visitor/Online
drwxrwxrwx 2  ./Mage/Reports/Model/Mysql4/Product/Lowstock

Conclusions

I don’t have any hard and fast conclusion here, because I can’t say with certainty that the magento upgrade changed either the index.php file or the directories named above. At least now, for the next upgrade, I will be able to know what the files’ permission sets were before and after the upgrade.

Neither can I say that chmod 775′ing the directories had any effect at all: I changed both the directories and index.php file at the same time – so, great. I changed two things so I don’t know which (maybe both?) fixed it ;) … but ah, it’s a fine line between getting it running and understanding it – and fanatically pursuing and exhausting every possible combination of options until you forget what you were doing in the first place.

But I strongly suspect I just had the chmod 644 that index.php file. Maybe I’ll just go back and … No! Stop me!

Bookmark and Share

About the Author

MXWest

One Response to “ A fix: Magento Frontend and/or Admin and/ or Admin menu doesn’t work ”

  1. I’ve had the same problems… seems to happen during extension installs / un-intalls – but I’m using a index.html file as a temp page and a .htaccess rewrite to it. Somehow that seems to be the issue – Ive never had an issue with other installs.

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>