execute child process as root user?

3,309 views
Skip to first unread message

kuno

unread,
Dec 24, 2012, 4:17:41 AM12/24/12
to nod...@googlegroups.com
I am building a node module that interact with ejabberd's control command line utlity `ejabberdctl`.

Unfortunately, on most systems, you need a root user permission to running `ejabberdctl`, becuse it either locates at /usr/sbin or /usr/local/sbin dirctory.

It seems to use this module, the whole process need to be running as a super user on *nix system. 

I wonder is there other way to resolve this issue?

--regards 

--kuno

Martin Cooper

unread,
Dec 24, 2012, 11:36:00 AM12/24/12
to nod...@googlegroups.com

Check out the uid and gid options described here:

http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options

--
Martin Cooper
 

--regards 

--kuno

--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply all
Reply to author
Forward
0 new messages