This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Different Result using ps -efW (Manual & Cron)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]