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]

problems with cron & permissions


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@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@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@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@home-pc ~/scrpits
$ pwd
/home/Michael/scrpits

_____________________________________________________
This is the location of the share:

Michael@home-pc /cygdrive/z/backups/Family
$ l
total 4.0M
-rw-r--r-- 1 Michael None 10 Aug  9 01:49 test

Michael@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


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