Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Grails 1.3.6 installed on my up to date Ubuntu box. I'd like to use the run-app command with the port set to port 80 (firewall, etc), however whenever I do I get the following exception:

Server failed to start: LifecycleException: Protocol handler initialization failed: java.net.BindException: Permission denied:80

How do I change my configuration so I can bind to port 80?

share|improve this question
2  
I don't have any knowledge about grails, but is it running with root ? A process can not bind to privileged ports (<1024) unless it runs with root or you set the bind capability to the binary. –  João Pinto Feb 1 '11 at 18:57
    
Definitely not running as root. How can I do the later? –  C. Ross Feb 1 '11 at 19:33
    
@João Pinto Since this is effectively java, if I set the bind capability, won't I set it for all java? –  C. Ross Feb 2 '11 at 18:04
2  
Yes, it will set it to all java apps. There is no other way to do it. check how to do it at serverfault.com/questions/133415/… . –  João Pinto Feb 3 '11 at 14:48
add comment

1 Answer

up vote 2 down vote accepted

As João Pinto notes, ordinarily only root can bind to privileged ports (1-1023). It's probably more common in cases like this to set up some kind of reverse proxy server (apache, nginx, lighttpd, etc.) to listen on port 80 and send requests back to the grails app running on a higher port.

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.