RT!我用c语言写了这么一个reboot.cgi,编译正常通过,在本机也能正常执行,用chmod +s reboot.cgi和chown apache.apache reboot.cgi对其进行了权限开放,通过网页调用cgi无任何反应,通过查看error_log发现系统提示:reboot need superuser xxxxxxxxxxxxxxx,我想问一下:是我开放权限的命令不对么?还是有什么别的错误?请高手帮忙解答下!在线等!#include <stdio.h>
#include <unistd.h>
int restart(void)
{
  printf("Content-type: text/plain\n\n");
  system("/usr/bin/reboot");
  return 0;
}int main(int argc,char*argv[])
{
int res;
res=restart();
return 0;
}