Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How do I set permissions for an HTTP server (nodejs) to run programs in /usr/local/share/npm/ safely?

My use case is to setup my OSX box to run cloud9 and use titanium to build iOS apps for iPhone/iPad. I got cloud9 running and am able to build an iPhone app from the browser, locally as an admin user. But while I can access the cloud9 instance from outside (via HTTP), I can not build apps as what-ever-user is when using cloud9 from afar.

It's not clear to me what user account the cloud9 instance is using because I don't know how to look that up. I'm also a little uneasy with setting executable permissions as I'm new to unix security.

Any help is appreciated and any follow up questions are welcome.

share|improve this question
add comment

1 Answer

There are a number of questions/answers on stackoverflow regarding nodejs and security/ports, etc. This one in particular might suit you, or you may try the related questions. Note: I'm assuming OSX is similar to linux in this regard, since I'm not familiar with OSX.

Essentially, for the most part it's a matter of port forwarding; because you're not able to listen on ports below 1024 as regular user (unless you downgrade privileges), you need to forward listening from port 80 to 3000, or something like that. Hope that helps :/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.