How to disable Internal Server Error if public_html has 777 permissions?

I have a script that unzips files to the local public_html folder, and that I access remotely via wget from another server (e.g. wget http://domain.com/unpack.php). The script needs the local public_html folder to have 777 permissions to work. I’m willing to accept the security risk; the script itself sets and resets permissions to 0750 via FTP automatically at any rate, so the 777 status lasts a couple seconds at most.

On some servers the script works fine. However on other servers, I get an Internal Server Error if the public_html folder has 777 permissions. The error log will display something like the following:

Fri Oct 08 011:15:20 2010] [error] [client x.x.x.x] SoftException in Application.cpp:601: Directory "/home/utabcond/public_html" is writeable by group

Is there a server setting that causes this Internal Server Error to occur? How can I disable this error message so that I can access files in the public_html folder even if the folder has 777 permissions?

If your server is running suPHP or PHP as CGI then you will not be able to set 777 permissions and for any world writable permissions you will get Internal Server Error. If you definitely need 777 permissions then you will have to setup PHP as an Apache module and 777 permissions will be allowed.