A lot of CGI script documentation advise you to give complete rights (chmod 777) to the directories. For your security (and for your data security), we advise you to set the rights according to chmod 705.
Our servers function in suExec mode, i.e. the CGI scripts are executed with your user and not as any kind of user.
For the PHP scripts, the determined rights are the same as for the CGIs .