1、本地可以运行system命令,可是通过cgi调用时却不执行,没有执行cgi中重定向命令。初始分析出是权限问题。

2、解决方法:

1)给cgi加权限

chmod +s my.cgi

2)配置apache以使其可执行cgi

<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

/usr/local/apache2/apachectl -k restart

3)给所在的目录加权限

参考

1】 关于权限,有比较好的引用

http://www.cnblogs.com/mydomain/archive/2011/09/28/2194048.html

相关文章:

  • 2022-01-02
  • 2021-11-22
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2023-01-09
  • 2021-11-30
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案