Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: Cygwin List Message-Id: <6.1.0.6.0.20040421220343.00a61dc0@127.0.0.1> X-Sender: Date: Wed, 21 Apr 2004 22:19:00 -0400 To: "Sachar, Bradley (NIH/OD)" , "'PLAN =?iso-8859-1?Q?Fr=E9d=E9ric?= URS Lyon'" From: Larry Hall Subject: RE: Unable to get CRON to work Cc: cygwin AT cygwin DOT com In-Reply-To: <3FAF4C075315FA4882BC2A9869A64F5699BB36@nihexchange15.nih.g ov> References: <3FAF4C075315FA4882BC2A9869A64F5699BB36 AT nihexchange15 DOT nih DOT gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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/