Connecting Tech Pros Worldwide Forums | Help | Site Map

how to change the effective user identficator

Daneel Yaitskov
Guest
 
Posts: n/a
#1: Jul 20 '08
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
Guest
 
Posts: n/a
#2: Jul 20 '08

re: how to change the effective user identficator


[Forwarding to CLPM because CLP is obsolete]

Daneel Yaitskov <rtfm.rtfm.rtfm@gmail.comwrote:
Quote:
>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
Daneel Yaitskov
Guest
 
Posts: n/a
#3: Jul 20 '08

re: how to change the effective user identficator


Jürgen Exner wrote:
Quote:
[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
Jürgen Exner
Guest
 
Posts: n/a
#4: Jul 20 '08

re: how to change the effective user identficator


Daneel Yaitskov <rtfm.rtfm.rtfm@gmail.comwrote:
Quote:
>Jürgen Exner wrote:
Quote:
>[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.
Quote:
>manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
>about it.
perldoc -q usenet

jue
Closed Thread