Jetty
  1. Jetty
  2. JETTY-639

Enable SMF management for Jetty on Solaris 10 and non-root user bind to privileged ports

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.1.11
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Solaris 10
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      Solaris 10 a feature that enable better service management, when running over privileged ports (80 and 443) with non-root credentials

      • This improvement enables non-root user to bind to privileged ports (80 and 443)
      • Note that there is no need to use the setuid jetty provides.
      • If the process die for some unknown reason, SMF facility restarts it
      • Also, this improvement has a SMF script to enable native solaris management, by using svcadm and svcs utilities.
        There are 2 patches.

      1. jetty.sh.diff is self explanatory
      2. jetty.xml is the SMF file

      Instructions

      1. as root copy jetty.xml to /var/svc/manifest/network/

      2. Modify the non-root user to start the jetty server, modify the jetty path as well

      vi +55 /var/svc/manifest/network/jetty.xml
      

      3. import the smf service

      svccfg -v import /var/svc/manifest/network/jetty.xml
      

      4. Validate

      svccfg validate /var/svc/manifest/network/jetty.xml 
      

      5. start

      svcadm enable svc:/network/http:jetty
      

      6. stop

      svcadm enable svc:/network/http:jetty
      

      7. check state

      svcs -a |grep jett
      online         17:41:56 svc:/network/http:jetty
      

      Enable non-root user to bind to privileged ports (this is only useful if start/stoping jetty by using jetty.sh)

      usermod -K defaultpriv=basic,net_privaddr USERNAME
      

      Where USERNAME is the desired username

      This has been working
      Solaris 10
      JDK 6u7
      Jetty 6.11

      1. jetty.sh.diff
        3 kB
        Claudio Miranda
      2. jetty.xml
        3 kB
        Claudio Miranda

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Joakim Erdfelt
            Reporter:
            Claudio Miranda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: