Defindit Docs and Howto Home

This page last modified: Jun 30 2004

# Use this rewrite to turn a non-suexec request into a 
# ~user request that will use suexec via the UserDir
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/~.*$
RewriteRule ^(.*.pl)$ /~twl8n/$1

# Since the Rewrite options will be in a directory context
# an explicit http host should not be necessary.
RewriteCond %{HTTP_HOST} ^$

Perl suid will work on Linux and Unix which have a /proc file system.

The .pl file needs to have the s bits set (6000). 

chmod 6755

This works too if the file is already 755:

chmod ug+s

Check with ls -l:
ls -l
-rwsr-sr-x  1 twl8n twl8n 715 Apr 29 17:03

For suid, but also have a secure path, so your Perl
script needs this line too:

$ENV{PATH} = "/bin:/usr/bin";