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

Posted by admin     Category: Linux Administration

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

Tags: , , , , ,

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image