CodeIgniter directory_map error during FusionInvoice install

I ran into an issue while installing FusionInvoice recently. I Googled the errorĀ  with no luck. It took me a bit longer than I’d like to admit to fix it so I hope I can make it easy for someone else.

FusionInvoice is a self hosted invoicing/tracking web app. I needed something simple to track the small amount of hosting I do on the side and this fit the bill perfectly.

While installing I kept getting blank options for the language list. I went in a started poking around in the code. I’ve never worked with CodeIgniter before but with it being a MVC framework, it was simple enough to find my way around. I set the languages variable by hand to get past that step, but more issues came up which were a result of the underlying problem.

On my Linux server by default I setup all directories for web apps with the permissions 711. Which means owner: read write execute, group: execute and other: execute. This allows a web app to access files in a directory and sub directories, but does not let them list the contents. A small security feature to make things a little harder if someone were to gain unauthorized access via a web vulnerability.

directory_map lists the directories in languages/, and it was failing because it didn’t have necessary permissions.

I haven’t ran into this before in other webapps, so while it is obvious now it was not at first. To resolve this issue change the permissions to 755. You can do this to all directories in the web app by running this in the document root:

find . -type d -exec chmod 755 {} \;

I hope to save at least one person 15 minutes.

Be Sociable, Share!

Comments are closed.