请问如何在apache服务器使CGI和PHP可以执行系统管理(如添加和删除用户)的外部命令?

由 169boy 在 06-08-2003 18:40 发表:

请问如何在apache服务器使CGI和PHP可以执行系统管理(如添加和删除用户)的外部命令?

我需要在PHP中执行一些系统管理(如添加和删除用户)的外部命令,由于apache的权限不足,所以我将/etc/passwd中的apache用户的uid和gid都改为0,

但启动apache时出现以下错误,说需要修改Configuration文件,并还要从新编译apache,请问需要那么麻烦吗?有没有其它简单的方法?万分感谢!!!

Error: Apache has not been designed to serve pages while

running as root. There are known race conditions that

will allow any local user to read any file on the system.

If you still desire to serve pages as root then

add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line in your

src/Configuration file and rebuild the server. It is

strongly suggested that you instead modify the User

directive in your httpd.conf file to list a non-root

user.

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus