Perl Script: Can’t do setuid (cannot exec sperl)

Your perl script sometimes work from the command line but shows “Internal Server Error” on accessing the script via the browser. The Apache error logs shows the error message as

"Can't do setuid (cannot exec sperl)".

The the reason for the setuid error on theĀ  perl script is the script have the setuid bit set and won’t work from the browser since they are running under the user apache. To make such perl scripts work, you need to install the perl-suidperl package.

To install the package, just execute the command

# yum install perl-suidperl
This entry was posted on Tuesday, February 23rd, 2010 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.