Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I was trying to setup jetty on port 80 but its giving exception saying permission denied as below. I have setup jetty to work with setuid and configured start.ini as follows:


(below as first configuration file in start.ini)


and jetty-setuid.xml file with username and group name of non root user.

2012-07-03 15:29:02.411:INFO:oejdp.ScanningAppProvider:Deployment monitor /opt/jetty-hightide-8.1.3.v20120416/contexts at interval 1
2012-07-03 15:29:02.454:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@ Permission denied Permission denied
        at Method)
        at org.eclipse.jetty.server.AbstractConnector.doStart(
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
        at org.eclipse.jetty.server.Server.doStart(
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
        at org.eclipse.jetty.xml.XmlConfiguration$
        at Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(
2012-07-03 15:29:02.455:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@66da9ea4: Permission denied Permission denied
share|improve this question

Ports below 1024 can only be bound to by the superuser. You can run jetty as superuser (root), or configure it to use a port above 1024 (say, 8080, this is usually done for Java-based app servers). If you want this to be accessible through port 80 at all costs, you can set an Apache server to forward (or "reverse-proxy") requests to Jetty. This is clearly documented here:

share|improve this answer

Leave Apache for Tomcat people, go for Nginx and those simple lines

server {
    listen 80;
    server_name localhost;
    access_log /var/log/nginx/example.log;

    location / {
        proxy_redirect off;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
share|improve this answer

Your Answer


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.