Guide on how to install Perl With Setuid Enabled on FreeBSD
A few applications may need Perl with setuid enabled. And it’s a must if you are going to run Qmail.
FreeBSD 7.x comes with Perl installed which is fine in most cases, unfortunately without setuid enabled. The easiest approach for fixing this is to simply reinstall perl. FreeBSD 8.x on the other hand comes without perl installed making it easier for you to install the version you like. This guide covers FreeBSD 8.x as well as FreeBSD 7.x and earlier.
Now we need to change the "make" environment in order to build with setuid=true. I know there is a check box during the installation that claims to build perl with setuid enabled. But I usually put it in the environment as well just to be safe.
Install whatever you prefer. Perl5.12 is the latest production release. In this example I’ll use perl5.10
When the options screen pop’s up [Screenshot] be sure “Build set-user-id setuidperl binary” is checked [x] and hit [OK]
When the installation is finished type the following to see if things turned out right.
You should get the following output.
First you need to figure out what version of Perl you have installed on your system. Type in the following.
You should get an output very similar to the one below.
Whatever version you may have 5.8 or 5.10 the first step is to uninstall your current version of perl.
Now that perl is uninstalled we need to change the "make" environment in order to build with setuid=true regardless of what version of perl you decide to install. I know there is a check box during the installation that claims to build perl with setuid enabled. But I usually put it in the environment as well just to be safe.
Right all thats left for you now is to decide what version of perl to install.
When the options screen pop’s up [Screenshot] be sure “Build set-user-id setuidperl binary” is checked [x] and hit [OK]
When the options screen pop’s up [Screenshot] be sure “Build set-user-id setuidperl binary” is checked [x] and hit [OK]
After the installation it’s probably a good idea to reboot.