I would check the file permissions, just as you suggested.
See 'who' the ownwer of your httpd (or like process) process is, and change the permissions of your dictionary to match. I've had to do something similar many times to execute root owned scripts or write to root owned files through my CGI programs.
If that doesn't work...
Run the script in debug mode (-d) and/or check your web logs (error_log for Apache). Maybe the answer to your question has already been logged.