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
</Directory>
when I run the script it's executed as wwwrun user.
when I
chown another_user script
and
chmod 4755 script
it runs as wwwrun user.
when I
chown root script
and
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:
### START SCRIPT
#!/usr/bin/perl -T
$ENV{'PATH'} = '/bin';
use CGI;
$cg = new CGI;
print $cg->header;
$comando = "echo lixo > /var/qmail/alias/lixo";
system($comando);
### END SCRIPT
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.
--
Att.
Flavio Fonseca
Administrador de Redes
Divisao de Redes
Universidade Federal de Uberlandia
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html