在apache conf 目录里 httpd.conf 配置文件中
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
</IfModule>
</IfModule>
这里设置apache 用户组,即执行cgi脚本的用户,注意cgi 写日志或者其他文件操作,要有此用户的权限。