how to change the effective user identficator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daneel Yaitskov

    how to change the effective user identficator

    Hi,


    I can't change the EUID of a perl process which performs a perl script.
    I used the manual perlsec and wrote the script:

    #!/usr/bin/perl

    use English '-no_match_vars';

    $EUID = 0;
    open(THEFILE, ">/var/log/messages") || die "can't open file";
    print "The file was opened\n";
    #end of the script

    The script file has the rights:
    $chown root:root test.pl
    $chmod a+xs test.pl
    The script gives the error "can't open file"


    Daneel
  • Jürgen Exner

    #2
    Re: how to change the effective user identficator

    [Forwarding to CLPM because CLP is obsolete]

    Daneel Yaitskov <rtfm.rtfm.rtfm @gmail.comwrote :
    >I can't change the EUID of a perl process which performs a perl script.
    >I used the manual perlsec and wrote the script:
    >
    >#!/usr/bin/perl
    >
    >use English '-no_match_vars';
    >
    >$EUID = 0;
    >open(THEFILE , ">/var/log/messages") || die "can't open file";
    >print "The file was opened\n";
    >#end of the script
    >
    >The script file has the rights:
    >$chown root:root test.pl
    >$chmod a+xs test.pl
    >The script gives the error "can't open file"
    >
    >
    >Daneel

    Comment

    • Daneel Yaitskov

      #3
      Re: how to change the effective user identficator

      Jürgen Exner wrote:
      [Forwarding to CLPM because CLP is obsolete]

      I don't know what is CLPM. I didn't find definition of CLPM or CLP in
      manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
      about it.



      Daneel

      Comment

      • Jürgen Exner

        #4
        Re: how to change the effective user identficator

        Daneel Yaitskov <rtfm.rtfm.rtfm @gmail.comwrote :
        >Jürgen Exner wrote:
        >[Forwarding to CLPM because CLP is obsolete]
        >
        >
        >I don't know what is CLPM. I didn't find definition of CLPM or CLP in
        comp.lang.perl. misc

        comp.lang.perl has been rmgroup'ed and replaced with the
        comp.lang.perl. * hierarchy over a decade ago.
        >manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
        >about it.
        perldoc -q usenet

        jue

        Comment

        Working...