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: Unable to get CRON to work


At 04:06 PM 4/21/2004, you wrote:
>I resolved my problem.
>
>1. When I first did the installation, I was logged on to my network.  By
>default, cygwin chose my network home directory (H drive) as my home
>directory instead of my C drive.  For some reason cygwin was not able to
>write to my network drives from cron (maybe because I don't own the root on
>the network drive?).  


'cron' needs to switch users to perform it's function.  To do this without
asking the user for a password, Cygwin switches the user's context without
authenticating through Windows.  This means Windows won't provide access 
to any resource that requires authentication to use.  If you're network
home directory cannot be accessed without authentication, you won't be 
able to access it through 'cron'.  This is a known issue for all services
that require switching user context without Windows authentication.  There's
many a discussion in the email archives on the subject.  You can work around
the issue by making your network home directory (or any network share that
you want to access) accessible to everyone.


>I switched my home directory to my C drive (by setting
>my "HOME" environment variable in windows2000 to c:\cygwin) instead of a
>network directory and it worked OK.


That's a viable alternative as well in this case.


>2. I also changed my default group to Administrators instead of mkgroup-l-d


'mkpasswd -l -d >/etc/passwd' and 'mkgroup -l -d >/etc/group' will provide 
you with the proper group information for your users.  It's probably best
to run these when you're setting up services.


>3. I needed to explicitly specify /bin/echo not just echo in the cron to
>test /bin/echo "test" > $HOME/test.out


Yes, this is also known.  It's best not to assume anything about the 
environment and to specify full paths to all executables, scripts, etc.

It's good to see you were able to work through all these issues. :-)
Thanks for providing feedback for the email archives as well.


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
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]