in reply to Re: suidperl not working?
in thread suidperl not working?

Sure, no problem.

I'm using Perl5.005_03 on RedHat 6.2 for x86.

The test script is installed like this:
$ ls -l test.pl -rwsr-xr-x 1 root root 101 May 22 12:38 test.pl
I didn't build the Perl version on this system, and the person who did doesn't work here any more. Might this functionality have been disabled when Perl was compiled?

Or any other suggestions, or any other information I can provide that might be helpful?

Thanks again.

Replies are listed 'Best First'.
Re: Re: Re: suidperl not working?
by virtualsue (Vicar) on May 22, 2002 at 17:12 UTC
    Aha, I just looked at hints/linux.sh for my Perl 5.6.1 installation, and found the following statement:

    # No version of Linux supports setuid scripts.

    I tried it on a PC here running SuSE Linux, and it didn't work there either.

      Hmmm, very interesting.

      Can't find hints/linux.sh on my system, so I guess I'll have to take your word for it, but I do believe you.

      Now the question is, why is starting a script with

      #!/usr/bin/suidperl
      instead of
      #!/usr/bin/perl
      not recommended?
        If you download Perl from http://www.perl.com and unpack it, you will find the hints subdirectory just below the top level. Have you read perlsec (perldoc perlsec if you are using a Perl version later than 5.005_03)?

        Why not look into using sudo to accomplish your task?