hmason300 has asked for the wisdom of the Perl Monks concerning the following question:

We are migrating to an AIX system and we have several perl scripts with the sticky bit set. When I go to execute one of those scripts I receive the following error. "Can't reswap uid and euid." Does anyone have any idea of what I might have done wrong when I installed perl on our AIX system. Any suggestions would be appreciated. Thank You

Replies are listed 'Best First'.
Re: Can't reswap uid and euid
by Abigail-II (Bishop) on Jul 30, 2002 at 15:58 UTC
    From man perldiag:
           Can't reswap uid and euid
               (P) The setreuid() call failed for some reason in the
               setuid emulator of suidperl.
    
    You might want to check the setreuid manual page. You should also note that there are differences between a BSD and a system V system when it comes to dealing with UID, EUID and SUID.

    There is an interesting read about that on http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf.

    Abigail

Re: Can't reswap uid and euid
by VSarkiss (Monsignor) on Jul 30, 2002 at 15:46 UTC

    Going out on a limb here, but it sounds like you're confusing "sticky" with "setuid". The sticky bit has to do with memory management, the setuid bit has to do with permissions, which is where your problem lies.

    I haven't used the AIX version of ls in a long time, but make sure you've chmod'ed the script appropriately (i.e. chmod +s or chmod +t).

    HTH

      You are correct. Thank you for setting me straight on that. I checked and the permissions appear to be correct.