Mark, there are two solutions.
1) Configure an SELinux policy to allow apache to write to the document root and subfolders.
2) Disable SELinux.
I opted for the latter. Thanks
p.s. file permissions should not be 777. I don't want to argue about it, but it is not necessary and poses a security risk. You are giving the public write permissions to a folder on the server. Instead, you should change the ownership of the 'document root' folder to apache:apache (if you use apache) and set file permissions to 775 or even 755.