Perfect; I suppose I skimmed over the docs. Thanks

    process.initgroups('www-data', 'www-data')    // add group www-data

    process.setgid(process.getgroups()[0])        // set user to www-data





On Fri, Nov 8, 2013 at 12:20 PM, Sam Roberts <s...@strongloop.com> wrote:

> On Fri, Nov 8, 2013 at 9:11 AM, Robert Steckroth
> <robertsteckr...@gmail.com> wrote:
> > I can set the user with a process.setuid(uid) command but this requires
> > knowledge of the UID of the user I need. I was hoping for a
> different/better
> > solution than manually parsing the /etc/passwd file.
>
> ???
>
> Sets the user identity of the process. (See setuid(2).) This accepts
> either a numerical ID or a username string. If a username is
> specified, this method blocks while resolving it to a numerical ID.
>
> - http://nodejs.org/api/process.html#process_process_setuid_id
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
<surgemcgee> Systems/Software Engineer

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to