[Mongrel] Mongrel as Windows service with normal privileges

Luis Lavena luislavena at gmail.com
Thu Jun 5 08:24:30 EDT 2008


On Thu, Jun 5, 2008 at 2:04 PM, Ingmar Stieger <ml at stiegerhs.de> wrote:
> 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).
>

The thing is that looking at the initial post:

6. Running the service with service user only in Users (or Power Users) group
  ===> DOES NOT WORK

This make me think that running as user is not working, but the thing
is is not actually working under LocalSystem account, I'm correct?

can you provide me the cacls output form C:\rails\x folder?

>> 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
>
> SERVICE_NAME: rails3
>       TYPE               : 10  WIN32_OWN_PROCESS
>       STATE              : 1  STOPPED
>                               (NOT_STOPPABLE, NOT_PAUSABLE,
> IGNORES_SHUTDOWN))
>
>       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
>
> SERVICE_NAME: rails3
>       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
> develop
> ment -p 3000 -a 127.0.0.1 -l "log/mongrel.log" -P "log/mongrel.pid" -c
> "C:/rails
> /x" -t 0 -r "public" -n 1024
>       LOAD_ORDER_GROUP   :
>       TAG                : 0
>       DISPLAY_NAME       : rails3
>       DEPENDENCIES       :
>       SERVICE_START_NAME : .\web
>

SERVICE_START_NAME looks like web is the username used?

> C:\>
>
> 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>.
>

I made a test application when this was shown the first time, can you
please try with it and provide me the output.

Thanks,

-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_info_3.7z
Type: application/x-7z-compressed
Size: 12719 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/mongrel-users/attachments/20080605/31f520dd/attachment.bin>


More information about the Mongrel-users mailing list