curl -g and crontab

Carl Reynolds redhat-list at hyperbole-software.com
Fri Feb 10 19:18:31 UTC 2006


Yixin Luo wrote:

>Hello.
>We put the a following script file - yixin.sh in the crontab. After crontab
>running, new folders have been build but no files downloaded in those
>folders.  If we run the script manually, the files could be downloaded in
>these folders.
>
>yixin.sh
>"mkdir /home/dj/share/yixin/`date +%Y%m%d`
>cd /home/dj/share/yixin/`date +%Y%m%d`
>export nb=`date +%Y%m%d`
>export URL="
>ftp://starfish.mar.dfo-mpo.gc.ca/pub/ocean/btoulany/GoMOOS/products"
>curl -g $URL/run-$nb\00.tar.gz -o run-$nb\00.tar.gz
>tar -zxvf run-$nb\00.tar.gz
>rm *tar.gz -rf
>"
>
>Here is our crontab file.
>01 09 * * * /home/wam/yixin.sh
>
>Thanks in advance.
>
>yixin
>  
>
It looks as if you may have a permissions problem. The script is 
creating directories in the /home/dj directory, but you are running it 
from /home/wam. Is the user that created the crontab wam and does wam 
have permission to write to /home/dj?



Carl.





More information about the redhat-list mailing list