[CentOS] Problem running a setuid Perl script on CentOS 4.5

Marc Wiatrowski mwia at iglass.net
Fri Nov 16 14:55:21 UTC 2007

On Fri, 2007-11-16 at 09:42 -0500, Alfred von Campe wrote:
> I'm trying to create a setuid Perl script (yes, I am aware about the  
> security implications), but am getting this error:
>    % cat testsetuid.pl
>    #!/usr/bin/perl -UT
>    print "My real user id is $< but my effective user id is $>\n";
>    exit(0);
>    % ./testsetuid.pl
>    Can't do setuid (cannot exec sperl)
> I am using the stock Perl that came with CentOS 4.5.  The problem I  
> am trying to solve is to run a software build as a particular user.   
> We want any user to be able to submit a build job that runs on the  
> build machine as the designated build user.  If there is a better way  
> to do this, I'm open to suggestions.
> Alfred

Being aware of the security implications, do you have
perl-suidperl-X.rpm installed?

More information about the CentOS mailing list