-California
Tel: 714-442-7591 Fax: 714-442-2840
Bob Rogers <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
01/20/2006 04:53 PM
To
Jeremy Muhlich <[EMAIL PROTECTED]>
cc
boston-pm@mail.pm.org
Subject
Re: [Boston.pm] Running shell commands with specified user permissions
From: Je
From: Jeremy Muhlich <[EMAIL PROTECTED]>
Date: Fri, 20 Jan 2006 12:02:20 -0500
On Thu, 2006-01-19 at 22:25 -0500, Bob Rogers wrote:
>Frequently I need to execute certain portions of the code (e.g that
>creates files / directories) with the user's permission. I am not
> I believe you'd want $> , the effective uid.
Probably. See
$ perldoc perlvar
or http://perldoc.perl.org/perlvar.html
under $REAL_USER_ID and $EFFECTIVE_USER_ID, but also see $REAL_GROUP_ID
$EFFECTIVE_GROUP_ID, you may need to set that too to get the desired
effect.See also POSIX::setuid()
On Thu, 2006-01-19 at 22:25 -0500, Bob Rogers wrote:
>Frequently I need to execute certain portions of the code (e.g that
>creates files / directories) with the user's permission. I am not sure
>how to do this in perl. Currently I am doing something like:
>
> I've never needed this
I have a script that runs as 'root' since it is one script that processes
files for all users. It is driven by a configuration file that includes
'process as' userids.
Frequently I need to execute certain portions of the code (e.g that
creates files / directories) with the user's
5 matches
Mail list logo