CGI and PL suddenly stopped working

M

momentsofclarity

Hello,

For an as yet determined reason, cgi and perl scripts suddenly stopped
working on my web server. Up until now (about 1 year) all has been
working just fine. I have tried all of the following with no joy...

-confirmed permissions on scripts, directories.
-confirmed proper ExecCGI arguments in httpd.conf
-chmod 777 scripts and directories (with suexec OFF)
-chmod +x /usr/bin/suidperl (suggested by a user on another mail list)
-deleted and relinked /usr/bin/perl to /usr/bin/perl5

Scripts run ok from the command line but only as root. If logged in as
the web user (apache), I get a "bad interpreter: Permission denied".
The browser message is the ever mysterious "500 Internal Server error".

Error logs just say "[error] (13)Permission denied: exec of
/path/to/test.pl failed".

Server info below:

kernel is 2.4.18-6mdk
Perl -v is v5.6.1
httpd -V is:

Server version: Apache-AdvancedExtranetServer/1.3.23 (Mandrake
Linux/4.1mdk)
Server built: Jun 20 2002 09:42:23
Server's Module Magic Number: 19990320:11
Server compiled with....
-D EAPI
-D EAPI_MM
-D EAPI_MM_CORE_PATH="/var/apache-mm/mm"
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_SHMGET_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FCNTL_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
-D DEFAULT_LOCKFILE="/var/run/httpd.lock"
-D DEFAULT_XFERLOG="/var/log/httpd/access_log"
-D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"

What am I missing?

Thanks.

-Matt
 
A

A. Sinan Unur

(e-mail address removed) wrote in @g14g2000cwa.googlegroups.com:

Please note that web server configuration and OS issues are off-topic for
this group.
What am I missing?

A short, simple CGI script that exhibits the problem.

That way, I would not have to ask if the path to perl is correctly
specified.

If it looks correct, did you transfer these files from a Windows computer
using binary ftp?

See also,

perldoc -q 500

Sinan
 
A

axel

For an as yet determined reason, cgi and perl scripts suddenly stopped
working on my web server. Up until now (about 1 year) all has been
working just fine. I have tried all of the following with no joy...
-confirmed permissions on scripts, directories.
-confirmed proper ExecCGI arguments in httpd.conf
-chmod 777 scripts and directories (with suexec OFF)
-chmod +x /usr/bin/suidperl (suggested by a user on another mail list)
-deleted and relinked /usr/bin/perl to /usr/bin/perl5
Scripts run ok from the command line but only as root. If logged in as
the web user (apache), I get a "bad interpreter: Permission denied".

This points to a permissions or path problem.

Have you tried the following when running as a non-root user:

% which perl
% perl -v

And seeing that the results are what you expect?

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top