Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: JJSH on March 24, 2009, 02:48:15 PM
-
This is continued from this http://forums.contribs.org/index.php/topic,43577.0.html (http://forums.contribs.org/index.php/topic,43577.0.html) post, but I've started a new topic because this isn't about the crontab contrib any more. Hope that is ok.
I got a cron job working, then set it to run overnight and thought I was done. Now, I get this in the email;
/home/e-smith/files/ibays/system/html/systemscripts/dailyevents.sh: line 2: /home/e-smith/files/ibays/system/html/systemscripts/export.sql
: No such file or directory
However, this is plainly nonsense, because if I copy the offending line, and paste it into putty with a preceding vim, my sql script pops up as expected. I've checked the permissions of export.sql, and have chmod 755 them, and still get the same error.
Can anyone suggest what to check next? The frustrating thing is that it was working, I simply added an echo command at the end of the shell script to say that it had finished, but I've removed this so that it is as before.
-
Interesting. I have recreated my .sh and .sql files and put them in a shorter path, /home/scripts/, and now the job fails with;
ERROR 1 (HY000) at line 1: Can't create/write to file '/home/e-smith/files/ibays/system/html/export/dailyexport.csv' (Errcode: 13)
which is the path the sql writes to now (which I've checked exists).
The thing is, the cron job runs a root. How can this be possible?
-
JJSH
Have you set appropriate read write & ownership permissions on those scripts.
Also it would help if you quoted the actual cron job text, so we could see what errors you are making (if any).