perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Fonseca>
Subject Suid programs not working with apache2
Date Sun, 06 Jun 2004 18:48:43 GMT
Hi all,

  I am running an apache2 server in a SuSE 9.0 box. Whiling running apache 
1.3x from the same distribution my scripts used to respect suid bit on perl 
scripts. When I replaced the server with apache2 this scripts stopped working 
because now the only run as apache user. I have tried everything I
could to solve it, and did not find a solution. Here is my site configuration.

ScriptAlias /listas2/ "/home/webmail/web/"

<Directory /home/webmail/web/ >
     Options Includes MultiViews +ExecCGI
     AllowOverride None
     Order allow,deny
     Allow from all

when I run the script it's executed as wwwrun user.
when I 
chown another_user script 
chmod 4755 script

it runs as wwwrun user.

when I
chown root script
chmod 4755 script

it runs as wwwrun usr.

when I
copy index.cgi to /home/webmail/web and index.cgi is a C wrapper that calls 
exec with the script name in /bin/script
chown root index.cgi
cp script /bin/script
chmod 755 /bin/script
chmod 4755 index.cgi

it runs as wwwrun user, not root.

I create this script:
#!/usr/bin/perl -T

$ENV{'PATH'} = '/bin';

use CGI;

$cg = new CGI;

print $cg->header;

$comando = "echo lixo > /var/qmail/alias/lixo";



and when I try all permission's combination listed above it fails, with 
permission denied to write to /var/qmail/alias directory.

Any help would be great. Thanks for you attention.

Flavio Fonseca
Administrador de Redes
Divisao de Redes
Universidade Federal de Uberlandia

Report problems:
Mail list info:
List etiquette:

View raw message