What's the issue with root owning the globally installed npm modules? Permissions should be set by npm so that whatever utilities are still be executable by your user.
Maybe it's common but I've never heard of anyone chowning /usr/local to their main user. It seems especially dangerous if there's applications in there that expect to run under their own special user account.
Personally, I wouldn't do that in Dev or Production. The way I see it global installs from npm are used to install things to the PATH, like applications, not necessarily to retrieve source code for development, like regular installs. In the same way you need sudo to install from your system repositories, you need sudo to install from npm globally.
I assume this is mainly because, correct me if I'm wrong, Linux is a multi user system by nature. You don't want just anyone or any user account to have access to edit the paths where shared user applications get installed.
Forcing everything to be owned by your user may prevent you from having to type sudo but I'm not sure I see any other advantages.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CACTUpAfubXUsoHH46LJR39r9xbERqGe5W_Gsbz43yq%3D3As8bEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the information.
> - a number of npm install scripts will fail when run with sudo,
> because they are run with privs of nobody, and can't write to the fs,
> the symptoms of which can be subtle and maddening to debug. I speak
> from sad experience, here.
Can you comment anymore on this?
What does privileges of nobody mean? Why couldn't a command run as root write to the fs?
Sorry for the ignorance.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CACmrRmTq-ug5F8zCoA_xvOp1qFVgAjZmM43nna_vM%3DgUeOZbeg%40mail.gmail.com.
On Jan 5, 2015, at 5:57 PM, Christopher Rust <cru...@gmail.com> wrote:Thanks for the information.
> - a number of npm install scripts will fail when run with sudo,
> because they are run with privs of nobody, and can't write to the fs,
> the symptoms of which can be subtle and maddening to debug. I speak
> from sad experience, here.Can you comment anymore on this?
What does privileges of nobody mean? Why couldn't a command run as root write to the fs?