in reply to suidperl not working?

Please give us more info on your platform, Perl version, etc. I have no problem getting this to work as expected on my system (Sun/Solaris 2.8/Perl 5). Are you sure you did a chmod u+s script_name?

Replies are listed 'Best First'.
Re: Re: suidperl not working?
by mas (Novice) on May 22, 2002 at 16:05 UTC
    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.
      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?