I have CGI program (written in C) that runs from apache server (2.22).
As a part of program flow, there are some commands that the program suppose to execute (grep, mutt). When I run this program mnually it works, but when it runs as a URL (https://myhost.mydomain/cgi-bin/myprogram
) any system command is not executing without generating error message.
I tried to create some log file where the output and error messages should be written (such as system("/bin/grep XXX file > /tmp/grep.log 2>&1")) but no log file was created.