You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Petr Hracek <ph...@gmail.com> on 2012/01/18 13:06:19 UTC
[users@httpd] Re: Running script CGI with IncludesNOEXEC
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 <ph...@gmail.com> 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Running script CGI with IncludesNOEXEC
Posted by Petr Hracek <ph...@gmail.com>.
Over HTML directive
<!-- #include virtual="./myCGIScript.cgi" -->
best regards
Petr
Dne 18. ledna 2012 15:51 Eric Covener <co...@gmail.com> napsal(a):
> On Wed, Jan 18, 2012 at 7:43 AM, Petr Hracek <ph...@gmail.com> wrote:
>> I have updated my configuration file so that:
>>
>> DocumentRoot "/opt/apache/htdocs/pubdocs"
>>
>> <Directory />
>> Options +IncludesNOEXEC -MultiViews -Indexes -FollowSymLinks
>
> How does your SHTML include the CGI script?
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Running script CGI with IncludesNOEXEC
Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 18, 2012 at 7:43 AM, Petr Hracek <ph...@gmail.com> wrote:
> I have updated my configuration file so that:
>
> DocumentRoot "/opt/apache/htdocs/pubdocs"
>
> <Directory />
> Options +IncludesNOEXEC -MultiViews -Indexes -FollowSymLinks
How does your SHTML include the CGI script?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Running script CGI with IncludesNOEXEC
Posted by Petr Hracek <ph...@gmail.com>.
I have updated my configuration file so that:
DocumentRoot "/opt/apache/htdocs/pubdocs"
<Directory />
Options +IncludesNOEXEC -MultiViews -Indexes -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /opt/apache/htdocs/pubdocs>
Options +IncludesNOEXEC -MultiViews -FollowSymLinks
Order deny,allow
Allow from all
</Directory>
But w/o success. Nevertheless I will change CGI to JS. Hopefully it
will work as CGI.
best regards
Petr
Dne 18. ledna 2012 13:15 Pete Houston <ph...@openstrike.co.uk> napsal(a):
> On Wed, Jan 18, 2012 at 01:06:19PM +0100, Petr Hracek wrote:
>> -- in the apache2 configuration file is mentioned
>> <Directory /opt/apache2/htdocs/>
>> Options IncludesNOEXEC -MultiViews -FollowSymLinks
>> Order deny,allow
>> Allow from all
>> </Directory>
>
> In your Options line you are mixing absolute and relative directives.
> Don't do that. If instead you do
>
> Options +IncludesNOEXEC -MultiViews -FollowSymLinks
>
> you may solve your problem. See the warning box in this section:
> http://httpd.apache.org/docs/2.2/mod/core.html#options
>
> Pete
> --
> Openstrike - improving business through open source
> http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107
--
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Running script CGI with IncludesNOEXEC
Posted by Pete Houston <ph...@openstrike.co.uk>.
On Wed, Jan 18, 2012 at 01:06:19PM +0100, Petr Hracek wrote:
> -- in the apache2 configuration file is mentioned
> <Directory /opt/apache2/htdocs/>
> Options IncludesNOEXEC -MultiViews -FollowSymLinks
> Order deny,allow
> Allow from all
> </Directory>
In your Options line you are mixing absolute and relative directives.
Don't do that. If instead you do
Options +IncludesNOEXEC -MultiViews -FollowSymLinks
you may solve your problem. See the warning box in this section:
http://httpd.apache.org/docs/2.2/mod/core.html#options
Pete
--
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107
Re: [users@httpd] Re: Running script CGI with IncludesNOEXEC
Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 18, 2012 at 7:06 AM, Petr Hracek <ph...@gmail.com> wrote:
> 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>
Don't mix +/- with non +/-
Enable +Includes if you want SSI+CGI.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org