[Mongrel] Mongrel as Windows service with normal privileges

Ingmar Stieger ml at stiegerhs.de
Thu Jun 5 08:04:15 EDT 2008

Luis Lavena wrote:

> On this ticket:
> http://rubyforge.org/tracker/?func=detail&atid=5145&aid=10820&group_id=1306
> You can use PsExec tool [1] to simulate another user and remove
> administrative privileges for testing:

Yes, it works with psexec. And it works running as the service user. If 
you have a look at my initial post, you can see the command line options 
I used for testing (nothing special here).

> You can search the mailing list and other tickets that explain how to
> perform it (was discussed several times).
> Can you provide the 'sc queryex' and 'sc qc' for your service and
> pastie it here?

C:\>sc queryex rails3

        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
                                (NOT_STOPPABLE, NOT_PAUSABLE, 

        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
        PID                : 0
        FLAGS              :

C:\>sc qc rails3
[SC] QueryServiceConfig SUCCESS

        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 3   DEMAND_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "c:/ruby/bin/mongrel_service.exe" single -e 
ment -p 3000 -a -l "log/mongrel.log" -P "log/mongrel.pid" -c 
/x" -t 0 -r "public" -n 1024
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : rails3
        DEPENDENCIES       :
        SERVICE_START_NAME : .\web


I've just tested this on another, totally different machine: Windows XP 
Home Edition, German, Rails 2.1.0, restricted user account: No go. 
Parent Name: <unknown>.

Thanks for your efforts,

More information about the Mongrel-users mailing list