delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.5 required=5.0 tests=BAYES_40,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Sun, 9 Aug 2009 02:59:15 +1000 |
Message-ID: | <12e24baa0908080959u7bd1125cm63d36d3c61d85214@mail.gmail.com> |
Subject: | problems with cron & permissions |
From: | michael trott <desiac AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
hi all, sure uve heard it all before. trying to get cron to backup my system to a samba share thats mounted to a local drive. i can run the script and back up fine. This is my crontab: Michael AT home-pc ~ $ crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.7ktN9TGaeS installed on Sun Aug 9 02:49:06 2009) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) * * * * * /home/Michael/scrpits/backup.sh _____________________________________________________ I've confirmed that if i put a basic echo date > to_file.txt in crontab works fine. This is the error i'm recevieing in cron.log: $ cat cron.log This file was written by the /usr/bin/cronlog script on 20090809_022001 From: root (Cron Daemon) To: Michael Subject: Cron <Michael AT home-pc> /home/Michael/scrpits/backup.sh X-Cron-Env: <ALLUSERSPROFILE=C:\Documents and Settings\All Users> X-Cron-Env: <COMMONPROGRAMFILES=C:\Program Files\Common Files> X-Cron-Env: <COMPUTERNAME=HOME-PC> X-Cron-Env: <COMSPEC=C:\WINDOWS\system32\cmd.exe> X-Cron-Env: <CYGWIN=ntsec> X-Cron-Env: <NUMBER_OF_PROCESSORS=2> X-Cron-Env: <OS=Windows_NT> X-Cron-Env: <PATH=/cygdrive/c/Program Files/PC Connectivity Solution/:/cygdrive/ c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdri ve/c/Program Files/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program File s/QuickTime/QTSystem/:/bin> X-Cron-Env: <PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH> X-Cron-Env: <PROCESSOR_ARCHITECTURE=x86> X-Cron-Env: <PROCESSOR_IDENTIFIER=x86 Family 15 Model 107 Stepping 2, AuthenticA MD> X-Cron-Env: <PROCESSOR_LEVEL=15> X-Cron-Env: <PROCESSOR_REVISION=6b02> X-Cron-Env: <PROGRAMFILES=C:\Program Files> X-Cron-Env: <SYSTEMDRIVE=C:> X-Cron-Env: <SYSTEMROOT=C:\WINDOWS> X-Cron-Env: <TMP=/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp> X-Cron-Env: <TEMP=/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp> X-Cron-Env: <WINDIR=C:\WINDOWS> X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/home/Michael> X-Cron-Env: <LOGNAME=Michael> ls: cannot access /cygdrive/z/backups/Family/: No such file or directory ls: cannot access /cygdrive/z/backups/Michael/: No such file or directory tar: Removing leading `/' from member namestar (child): /cygdrive/z/backups/Michael/Michael_09-08-09.tar.bz : Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now /home/Michael/scrpits/backup.sh: line 16: []: command not found tar (child): tar: Removing leading `/' from member names /cygdrive/z/backups/Family/Family_09-08-09.tar.bz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now /home/Michael/scrpits/backup.sh: line 22: []: command not found _____________________________________________________ Location of the scripts: Michael AT home-pc ~/scrpits $ l total 5.0K -rwxr-xr-x 1 Michael None 835 Aug 9 01:32 backup.sh -rw-r--r-- 1 Michael None 49 Aug 9 02:18 temp.sh Michael AT home-pc ~/scrpits $ pwd /home/Michael/scrpits _____________________________________________________ This is the location of the share: Michael AT home-pc /cygdrive/z/backups/Family $ l total 4.0M -rw-r--r-- 1 Michael None 10 Aug 9 01:49 test Michael AT home-pc /cygdrive/z/backups/Family $ l ./../ total 0 drwxr-xr-x 1 Michael None 0 Aug 9 01:49 Family drwxr-xr-x 1 Michael None 0 Aug 9 01:37 Michael _____________________________________________________ I originally had cron running as system, thought it may be to do with permissions, so now running cron as my user, still same problem. I can't chmod or chown the dir's above. Anyone have any ideas or suggestions? Just to reiterate works perfectly when i initiate the script myself. thanks alot Michael -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |