Fix for CentOS “Can’t do setuid (cannot exec sperl)”

Posted on October 1st, 2007 in General,Linux System Administration,Programming by Brandon

If you are running a Perl script with the setuid bit, it actually runs a slightly modified version of Perl so that it is a bit more cautious. On a CentOS box, you need to install the ‘perl-suidperl’ package to get the necessary files installed. Otherwise you get an error like this:

[root@host bin]# ls -al
-rws--S--- 1 mail mail 1218 Oct  1 13:09

[root@host bin]# ./
Can't do setuid (cannot exec sperl)

3 Responses to 'Fix for CentOS “Can’t do setuid (cannot exec sperl)”'

Subscribe to comments with RSS or TrackBack to 'Fix for CentOS “Can’t do setuid (cannot exec sperl)”'.

  1. Apophys said,

    on November 18th, 2007 at 9:11 am

    Thank you for the tip ! I was blocked because of that.

  2. on July 15th, 2008 at 5:49 am

    Thanks for this fix. It solved my issue with Apache running BackupPC perl Scripts :-)

  3. Nic said,

    on November 9th, 2010 at 7:25 am

    Thanks! This helped us get AWStats working again

Post a comment

Please copy the string ouRSIk to the field below: