swaroop has asked for the wisdom of the Perl Monks concerning the following question:
========================================use strict; use English; use File::Copy qw(cp); use Crap qw(croak); my ($old_euid,$old_egid); $old_euid = $>; $old_egid = $); # now change the euid and egid to "user1" $> = "23333"; # new uid $) = "7755"; # "user1" primary group. croak("failed to copy ") unless ( cp("/var/tmp/srcfile","/x/tmp/dstfil +e") );
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: EUID and EGID
by merlyn (Sage) on Feb 26, 2006 at 12:57 UTC | |
by swaroop (Beadle) on Feb 27, 2006 at 06:32 UTC | |
|
Re: EUID and EGID
by bluto (Curate) on Feb 27, 2006 at 17:59 UTC |