Re: [Boston.pm] Running shell commands with specified user permissions

2006-01-20 Thread Ranga Nathan
-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

Re: [Boston.pm] Running shell commands with specified user permissions

2006-01-20 Thread Bob Rogers
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

Re: [Boston.pm] Running shell commands with specified user permissions

2006-01-20 Thread Ricker, William
> 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()

Re: [Boston.pm] Running shell commands with specified user permissions

2006-01-20 Thread Jeremy Muhlich
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

[Boston.pm] Running shell commands with specified user permissions

2006-01-19 Thread Ranga Nathan
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