The Files and folders on a cgi (suExec/SuPHP) driven server are 755 for folders and 644 for files with an extra security on the configuration.php = 640
This is how all Joomla site must operate to be secure. Any other settings are incorrect and dangerous or make Joomla not work. If your server is properly setup (in a cgi-environment) files that get permissions with ‘777’ for instance will throw an internal (500) error.
Don’t forget to change the ownership of the whole folder structure:
chown apache:apache root_folder_of_joomla