this is my code:
var vlc = spawn("cvlc", [file], {uid:1000,gid:1000});
The program in node is executed through an instance of forever launched by root user. As cvlc does not permit to be executed as root I need it to be executed as normal user.
This is the way node.js explains how to do it: http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options but does not work.