From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21229 invoked by alias); 20 Jun 2013 10:53:02 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 21219 invoked by uid 89); 20 Jun 2013 10:53:02 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 20 Jun 2013 10:53:01 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 94995520781; Thu, 20 Jun 2013 12:52:58 +0200 (CEST) Date: Thu, 20 Jun 2013 13:07:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Different Result using ps -efW (Manual & Cron) Message-ID: <20130620105258.GO1620@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <1371716521.698.YahooMailNeo@web162103.mail.bf1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1371716521.698.YahooMailNeo@web162103.mail.bf1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-06/txt/msg00530.txt.bz2 On Jun 20 01:22, Jun Iriola wrote: > Hi, > > I made a simple script that should detect if a certain service is running or not.  Said script will run via cron. > > When I tested it and executed it manually in the command prompt, it list all Cygwin and Windows processes. But when I put it in cron, the number of services detected were not the same. Account used is the same during manual execution and also on cron. > > To get the list of services, I use this command /usr/bin/ps -efW. > > Do you have any idea why such behavior?  Help is very much appreciated.  Thanks. It's probably related to your user token's permissions. See http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview Try using method 3, it should give full, equivalent access as in interactive mode. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat -- 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