LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 886|回复: 2

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

[复制链接]
发表于 2003-6-8 18:40:49 | 显示全部楼层 |阅读模式
我需要在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.                                                   
/usr/sbin/apachectl start: httpd could not be started
发表于 2003-6-8 19:07:07 | 显示全部楼层
这样非常不安全,不提倡
 楼主| 发表于 2003-6-8 19:12:32 | 显示全部楼层
这个我知道呀,但是确实需要用到该功能如何是好?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表