delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/02/08:55:37

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=cYV
euzGWe36OHx2i1M1maBmv+6hEovLquHGTmNUxvKuV+fxUtmgXsKBW7F3FxxQKUcm
dxOo/MqQtfmuZ/eE79vy2Js4JHi85jughc2E6l0cKnUnv8gjzYugSkhUJsH+l+P2
zOyCGhNZ40bDhX3yJ7WDmEn5yg6I7oiATyoCvSs0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=if6rfxNJF
y49jMOeS1xSWvp16BI=; b=TNc0qNMeN10U+jvnn5HPTJPE5BQ3VCnVetlwyd05A
PPR5J/PiespZNF+Nde6lZywrOLona6yf9zm91eLZSN1gNPOa8zUQdAdRzboQf6tW
rjiU6wzkG41tR8A8xA4hZDqvRRlHzyp/aDYChPkcYHHbUtgSQV4xiXJfQmkYqgPD
Uo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: "D. Boland" <daniel AT boland DOT nl>
Subject: Cygrunsrv crashes when setting STDERR to /dev/null
Date: Sun, 02 Mar 2014 14:58:53 +0100
Lines: 32
Message-ID: <5313391D.580E9785@boland.nl>
Mime-Version: 1.0
X-IsSubscribed: yes

Hi group,

I have Apache running via cygrunsrv on a WinXP system. It works fine. Apache can
even do a setuid on startup, so a 'ps -ef' looks like this:

     UID     PID    PPID  TTY        STIME COMMAND
   httpd    1604    1308 ?        14:26:47 /usr/local/apache/bin/httpd
  SYSTEM    1308    1400 ?        14:26:47 /usr/local/apache/bin/httpd
   httpd     896    1308 ?        14:26:47 /usr/local/apache/bin/httpd
   httpd     536    1308 ?        14:26:47 /usr/local/apache/bin/httpd
   httpd     612    1308 ?        14:26:47 /usr/local/apache/bin/httpd
   httpd     560    1308 ?        14:26:47 /usr/local/apache/bin/httpd

As you can see, I have it running as 'httpd', an unprivileged user, which I created
without password and removed from the 'Users' group, so it cannot login.

Unfortunately, this doesn't work on a Win7 system. If I try the same configuration
in a Win7 system, the following message is logged in logs/error_log and the Service
won't start:

[alert] (1)Operation not permitted: setuid: unable to change to uid: 1006

So, I set a password for the 'httpd' user and configured the Service to log on as
that user. This works, but now I cannot use cygrunsrv's -1 or -2 switches for
redirecting STDOUT and STDERR anymore.

cygrunsrv crashes if I set either one of them to /dev/null. If I unset them, it
works.

Can anybody help?

Daniel


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019