being able to run the command line stuff is definitely a weakness (security wise) personally, i set the $PATH of the account that runs apache to /usr/hyphen/bin (hyphen is my apache account) and then make symbolic links for all the commands i'll need. it means that any malicious attempt to run something like chmod, sudo, rm, chatter or whatever will need to know the full path. Normally that's not hard, but the TRULY paranoid can go and change the directory names for all the bins (and, of course, update their $PATHs). For even more paranoia, you can write small C wrappers on all your local commands, ie
int main(int argc, char *argv[])
{
char command[50];
FILE *fp;
fp = fopen("/tmp/log", "r");
fwrite(fp, "somebody ran the cat command");
fclose(fp);
strcpy(command, argv[1]);
strcat(command, argv[2]);
system(command);
}
that will log them being called. Note that the above code has a very good chance of not working (C is getting rusty... sigh).
sorry about the blabbering....
-frymaster