SQ,
I am surprised the installation documents you found told you to put a directory block in the Apache configuration file for the Moodle data folder like the one for the Moodle documents folder. You can't be talking about the document at moodle.org, because the one I looked at (http://docs.moodle.org/en/RedHat_Linux_installation#Setup_Apache) doesn't say that; you must have looked at a different installation document. The reason I am surprised is that that block tells Apache to give web access to the Moodle data folder, of which moodle.org specifically says just the opposite, i.e., to deny web access to that folder, for security reasons. However, that is a separate issue. I was hoping that removing that block would solve your problem also, because nothing else we have tried has worked, and it is very disappointing that it didn't. But it is a good thing to keep that block out of httpd.conf for security reasons.
So based on your posts, the Moodle data folder (and all sub-folders) is owned by apache, the user Apache runs as, and all permissions have been granted for those folders, so that's not the reason permission is being denied. As far as I can tell, there is now nothing in httpd.conf that would cause Apache to deny Moodle permission to write to those folders, either. I have run out of ideas as to what could cause this permission denial to happen. All I can think to do is to debug. This would involve going into php.ini and turning on all error reporting and then looking at the log(s). I don't know for a fact that this will give us more info on why permission is being denied, but I don't know what else to try.
So if you are ready and willing, here is what to look for in php.ini (after making a backup copy!):
- Look for a line that begins "error_reporting" that doesn't have a semicolon in front of it. Change it to read "error_reporting = E_ALL". If there isn't any, look for a line that says that with a semicolon in front of it, and remove the semicolon. If there isn't any, type it in where the error-reporting examples are.
- Similarly to #1, make sure the line that begins "log_errors" without a semicolon in front of it says "log_errors = On".
- Again, similarly to the first two, make sure there is a line beginning "error_log" without a semicolon in front; it should say something like "error_log = moodlelog". This one is a little tricky, because the moodlelog file needs to be in a folder we can write to. Since our problem is being denied permission to write to the moodledata folder in the first place, we need to find a place we can write to. I would suggest using the Moodle web document folder, which in your case is /usr/moodle/moodle_1_8. So the full line would be "error_log = /usr/moodle/moodle_1_8/moodlelog".
- Restart Apache and try the installation again. Then look at moodlelog (and the Apache log) and see if there is anything there we don't already know! The error messages should also appear in your browser.
If this is too complicated, you can attach your php.ini file to your next post and I'll make the changes. A simpler procedure, which will cause the error messages to appear in your browser, is to make the Moodle source code change suggested in http://moodle.org/mod/forum/discuss.php?d=71081#p318466.
If that doesn't help, there are more debugging options to try!
RLE