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: Cygwin Cron on Windows 2003 Server Issues


On Wed, 8 Sep 2004, Paul J. Ghosh wrote:

> Thank you to all who have replied.  Enclosed find the following:
>
> 	- contents of crontab for user cdaapp - simple task to be executed
> 	  every minute for testing

Looks ok, but see below for permissions issues.

> 	- error encountered when starting cron as service_cron - includes
> 	  one as a dialog and another from the event viewer

Hmm, can you log in as service_cron and try running the cron service
command ("/usr/sbin/cron -D") and "cygcheck -svr" from the command line?
That would help answer a few questions...

> 	- test of task to be executed by cron done manually as user cdaapp
> 	  which succeeded

Again, you need to run this task as service_cron to get a meaningful
result.

> 	- error encountered when successfully starting cron as Local
> 	  System but fails when it comes time to execute task - we are
> 	  aware of Local System account changes in W2K3 related to setuid
> 	  and were not expecting it to work

But the service started, which shows that it *might* be a permissions
issue.  Besides checking the applications, check all the relevant
directories, and make sure service_cron has the execute permission on them
(which will allow it to enter the directories and access the files in
them), and the write permission to any directory where it needs to create
files.

> 	- long listing of /bin /usr/sbin /var /var/cron /var/cron/tabs -
> 	  bin executable by all (755)

How about "ls -ld /bin /usr/sbin /var/log/cda"?

> 	  /var/cron/tabs seems locked down

Actually, since you've started cron as different users, it's possible that
SYSTEM owns some of the files, and service_cron has no access to them
(see, for example, /var/cron/tabs/cdapp).  This *may* be a bug in the
crontab application (i.e., it may assume that SYSTEM will be the user
running cron).

> 	- parts of /etc/passwd for user cdaapp - tried changing groups
> 	  513/544 without any success

You may need to add service_cron to the SYSTEM group...

> 	- parts of /etc/group
>
> Regards,
>
> Paul J. Ghosh
>
> [snip]
>
> ###########################################################
> ls -l /var
> total 0
> drwxrwx---+   3 devadm   Users           0 Sep  1 09:19 cache
> drwxrwxrwt+   3 devadm   Users           0 Oct  7  2003 cron
> drwxrwx---+   2 devadm   Users           0 Sep  7 17:04 log
         ^^^
Aha.  One problem here.

> drwxr-xr-x+   2 SYSTEM   root            0 Oct  7  2003 proftpd
> drwxrwxrwx+   2 devadm   Users           0 Sep  8 14:36 run
> drwxrwx---+   2 devadm   Users           0 Oct  7  2003 tmp
>
> [snip]
> ###########################################################
> ls -l /var/cron/tabs
> total 1
> -rw-r-----    1 cdaapp   SYSTEM        392 Sep  8 13:12 cdaapp
         ^^^
Another here.  This file will be unreadable to a service running as
service_cron, even if you manage to get it started.

> ###########################################################
> cygcheck -svr
> [snip]

In the future, please *attach* the output of "cygcheck -svr" as an
uncompressed text attachment, instead of including it inline.

>  1126k 2004/05/26 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
>                   "cygwin1.dll" v0.0 ts=2004/5/25 21:07
>     Cygwin DLL version info:
>         DLL version: 1.5.10

Probably not related to your problem, but why not upgrade to 1.5.11?

BTW, your /etc/passwd and /etc/group entries look ok.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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


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