C language of the CGI program uses the system function to call external command

I recently worked on the CGI procedures, the use of C language. I think the content generation configuration script read some file, close the file pointer after using system ("/usr/application.sh"); call the script application.sh, the return value is a 5 bit integer. But the configuration failed, fail to see the configuration in the Linux command line, do not take effect. The script is no problem, direct execution can be successfully configured on the command line. Excuse me, dear brother, what is this? CGI cannot perform the external file.? ,
A application.sh script file, stored in the "/etc/" directory.
iptables -F
iptables -A FORWARD -s -j DROP
iptables -A FORWARD -m mac --mac-source aa:BB:CC:DD:EE:FF -j DROP
iptables -A FORWARD -s -m mac --mac-source ! B2:C3:DD:E5:A5:03 -j DROP

Started by Jack at November 19, 2016 - 9:25 PM

Wrong, script file stored in the "/usr/" directory

Posted by Jack at November 22, 2016 - 10:01 PM

You CGI Apache? You CGI what is the use of the user to execute this command.
May be user rights problem.

Posted by Rose at November 23, 2016 - 10:50 PM