How to setup suidperl for Open WebMail
running on Slackware

Written by Kevin L. Ellis

            This tutorial will show you how to compile suidperl for Slackware so you can run Open WebMail (OWM). Later versions of the perl package for Slackware don't come with suidperl, so you have to download the package source and compile the package yourself so you'll have suidperl.  Once suidperl is setup you can then setup SpeedyCGI so OWM will run faster.  This tutorial was written for Slackware 10.2 with perl 5.8.7 but should also apply to other versions.

1.    First, download the source for the perl package.  Go to and find a mirror near you.  Once there go to the perl source directory (slackware-10.2/source/d/perl) and download all the files there.

2.     Run the  perl.SlackBuild  script to first build the standard package.

3.     Once that is done you'll need to edit the  perl.SlackBuild  script file.  Go to the section that starts with "# Extract the source code:"  You'll want to comment out the 'rm' and 'tar' lines:

#rm -rf perl-$VERSION
#tar xjvf $CWD/perl-$VERSION.tar.bz2

        Next go to the configure section "# Configure perl:" and comment out the entire section:

#./Configure -de \
#  -Dprefix=/usr \
#  -Dcccdlflags='-fPIC' \
#  -Dinstallprefix=/usr \
#  -Doptimize="$SLKCFLAGS" \
#  -Dinc_version_list='5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' \
#  -Darchname=$ARCH-linux

        Now add in a command to make sure we compile suidperl, go to "# Build perl" and add in a "make suidperl" line:

# Build perl
make -j3
make suidperl
make test

4.    After that we need to modify the  that was created the first time we ran the  perl.SlackBuild  scipt.  So go to /tmp/perl-5.8.7 and edit  We're going to edit two lines as stated in the OWM FAQ file.  We want to set this:


5.    Now run the perl.SlackBuild  script again to rebuid the package with suidperl support.  Once the package is made again either install or upgrade your perl package with the new one.

6.    Once the package is installed make sure the suid bit is set:

chmod +s /usr/bin/sperl5.8.7

        Depending upon the version of perl you are installing the filename will need to be changed.

        That's all that's needed.  Now just follow the OWM readme file and install the extra perl modules that are needed to run OWM.  Once you get your installation of OWM up and running you can think about running it with SpeedyCGI to get a pretty good performance increase.  Instructions for doing that are here:

Last Modified: 1/30/06