Gallery site suddenly stops working: check file permissions

Today I found that a Menalto Gallery v.2.3 site I run had simply stopped working. I had made no changes in weeks, so this was peculiar.

Browsing to the front page brought up only the standard error page which shows up for 403 and 404 (page not found) errors and probably for 500 errors (permissions issues) as well.

I was able to run the Gallery installer again, but still no improvement. Then I decided to overwrite all the files with clean files. That’s when the problem became obvious: one file could not be overwritten because of its permissions settings: main.php (the front page) page. NO viewing or writing permissions were set on that file.

Upon resetting main.php’s permissions to 644, everything started working again. I’m not thrilled that the permissions changed spontaneously, but it’s faintly possible that Gallery itself did that, since it can change permissions on its own files.

So if your Gallery installation suddenly fails and you have not changed anything, check permissions on main.php!