Fix for CentOS “Can’t do setuid (cannot exec sperl)”
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 myscript.pl -rws--S--- 1 mail mail 1218 Oct 1 13:09 myscript.pl [root@host bin]# ./myscript.pl Can't do setuid (cannot exec sperl)
on November 18th, 2007 at 9:11 am
Thank you for the tip ! I was blocked because of that.
on July 15th, 2008 at 5:49 am
Thanks for this fix. It solved my issue with Apache running BackupPC perl Scripts
on November 9th, 2010 at 7:25 am
Thanks! This helped us get AWStats working again