Solution to: How do I fix the following error when using Apache/PHP/FastCGI/suEXEC? “suexec policy violation: see suexec log for more details”
I use FastCGI/suEXEC on my Apache server for PHP scripts. Recently, when creating a new virtual host, the following error message creeped up in the global Apache log error file (not the virtual host’s error file):
suexec policy violation: see suexec log for more details
Accompanying this error was a 500 error in the browser.
Solution
suEXEC is picky about file permissions. I needed to set the virtual hosts fastcgi wrapper script (and parent folder, I think) to the user/group I set in the SuexecUserGroup
setting in the Apache config file. So because I had these two lines in the conf file:
fe58070af1b59a30d810cc862e63322f000
I had to chown the script and parent folder like this:
fe58070af1b59a30d810cc862e63322f001
Silly mistake that was quickly fixed.
Caveats
I’m not 100% sure if changing the permissions on the parent folder is necessary. You can try just the script first, and if that doesn’t work, then change the parent folder perms as well.