Re: CGI Scripting Question

From: Boris Glawe (boris_at_boris-glawe.de)
Date: 06/21/05


Date: Tue, 21 Jun 2005 17:15:18 +0200

Don wrote:
> I've installed RHEL 4 WS on a PC and I am having some trouble with cgi
> scripts.
>
> I finally got the scripts to put out HTML, but the part that collects
> and displays data from my application is not working. I get no HTML
> output to the screen when I run them in the /var/www/cgi-bin directory.
>
>
> I've copies the scripts to /tmp/cgi-bin. I get HTML output on the
> screen and the data collection & display works correctly when run the
> same script from /tmp/cgi-bin.
>
> I can run the two copies of the script as root or apache with the same
> results.
>
> Anyone have any ideas on how to correct this problem?
>

Look at /var/log/messages.

I am sure, that selinux refuses to execute the scripts. Only apache is
allowed to execute them.

You can disable selinux or you can disable selinux for apache only. Run
system-config-securitylevel for that.

It is not a good idea though to disable selinux, since it protects your
system very effectivly.

I am also missing a good tutorial how to do cgi-skripting, html-document
updloads via ftp, etc with selinux. Does anybody have any hints?

greets Boris



Relevant Pages

  • Re: multiuser permissions
    ... > Apache runs as user apache, ... > PHP runs within Apache in SAFE_MODE, which blocks joeuser's scripts ... > from opening any files not created by joeuser. ... Perl scripts can also, ...
    (comp.unix.admin)
  • RE: Automation of Administrative Tasks on an RHEL Box
    ... but only if the sudoers file has been configured to give the apache access to run scripts as root... ... user or a user with some root privileges can issue. ...
    (RedHat)
  • Re: Will Linux become as vulnerable as MS ??
    ... But people sometimes infected by viruses from files ... Then anyone with a basic understanding of shell scripts could write one ... > Apache, and despite having several rather nasty holes in Apache, or it's ... > the vile record that IIS holds in spreading malware. ...
    (comp.os.linux.security)
  • Re: Will Linux become as vulnerable as MS ??
    ... >> Linux, each distro is a little different, and even within the distro, ... > Then anyone with a basic understanding of shell scripts could write one ... >> Apache, and despite having several rather nasty holes in Apache, or it's ... >> the vile record that IIS holds in spreading malware. ...
    (comp.os.linux.security)
  • Re: Confused about /etc/rc.d and apache
    ... These scripts do this by looking to see whether script-name_enable has ... And a grep for apache or http in /etc/rc.d turns up nothing. ... applications mau also have such a control program, ... When I first began with FreeBSD I ...
    (comp.unix.bsd.freebsd.misc)