Re: Running script CGI with IncludesNOEXEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear users,

do you have any suggestion how to solve that problem?
I will try to summarized my problem:
-- when I writedown to browser http://IP/index.shtml where is mentioned
<!--#include virtual="./myCGIScript.cgi" -->
then it shown me
    [an error occured while processing this directive]
in the /var/log/apache2/error_log is mentioned:
 unable to include potential exec "./myCGIScript.cgi" in parsed file
-- in the apache2 configuration file is mentioned
  <Directory /opt/apache2/htdocs/>
     Options IncludesNOEXEC -MultiViews -FollowSymLinks
     Order deny,allow
     Allow from all
  </Directory>

  AddHandler cgi-script .cgi
  AddHandler server-parsed .shtml
  <FilesMatch "\.(cgi|cgi.en_US|cgi.de)$">
     Options +ExecCGI -MultiViews -FollowSymLinks
  </FilesMatch>

>From the apache2 source code I have found out:
        if (!error_fmt && (ctx->flags & SSI_FLAG_NO_EXEC) &&
            rr->content_type && strncmp(rr->content_type, "text/", 5)) {

            error_fmt = "unable to include potential exec \"%s\" in parsed "
                        "file %s";
        }

best regards
Petr Hracek

Dne 13. ledna 2012 9:54 Petr Hracek <phracek2@xxxxxxxxx> napsal(a):
> Dear user,
>
> I have a question.
> I need to run from my page CGI script but in the /var/log/apache2/error_log
> I see:
> [Fri Jan 13 10:12:45 2012] [error] [client 10.7.254.58] unable to
> include potential exec "./testdiag.cgi" in parsed file
> /opt/apache2/htdocs/index.shtml.en_US
>
> in the configuration file is mentioned:
> <Directory /opt/apache2/htdocs/>
>    Options IncludesNOEXEC -MultiViews -FollowSymLinks
>    Order deny,allow
>    Allow from all
> </Directory>
>
> AddHandler cgi-script .cgi
> AddHandler server-parsed .shtml
> <FilesMatch "\.(cgi|cgi.en_US|cgi.de)$">
>    Options +ExecCGI -MultiViews -FollowSymLinks
> </FilesMatch>
>
> in the apache2 documentation is mentioned:
> IncludesNOEXEC
>    Server-side includes are permitted, but the #exec cmd and #exec
> cgi are disabled. It is still possible to #include virtual CGI scripts
> from ScriptAliased directories.
>
> How to do that so that CGI script will work
> My CGI  script has of course permissions 750
>
>
> --
> Best Regards / S pozdravem
> Petr Hracek



-- 
Best Regards / S pozdravem
Petr Hracek

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux