I'm trying to run wget via a cronjob on ubuntu server 12.04 LTS (GNU/Linux 3.2.0-25-virtual x86_64). It seems that via syslog it that the cronjob is run, however the output file from wget isn't created.
If I run the same wget command manually, the file is created.
the cronjob itself:
# m h dom mon dow command
00 05 * * Sun wget http://private.ip/ -O /home/ubuntu/store/`date +%s`
00 08 * * Sun /usr/bin/killall wget
relevant parts of the syslog show that the cron jobs execute:
Jul 22 05:00:01 private.ip2 CRON: (ubuntu) CMD (wget http://private.ip/ -O /home/ubuntu/store/`date +)
Jul 22 08:00:01 private.ip2 CRON: (ubuntu) CMD (/usr/bin/killall wget)
when i run the wget code from the terminal via the ubuntu user account it works:
ubuntu@ip-10-245-74-62:~$ wget http://private.ip/ -O /home/ubuntu/store/`date +%s`
--2012-07-23 18:44:33-- http://private.ip
Resolving private.ip (private.ip)... private.ip,private.ip
Connecting to private.ip (private.ip)|private.ip... connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Saving to: `/home/ubuntu/store/1343069073'
[ <=> ] 391,704 56.4K/s ^C
firstname.lastname@example.org:~$ ls -lah /home/ubuntu/store/
drwxrwxr-x 2 ubuntu ubuntu 4.0K Jul 23 18:44 .
drwxr-xr-x 6 ubuntu ubuntu 4.0K Jul 23 18:41 ..
-rw-rw-r-- 1 ubuntu ubuntu 396K Jul 23 18:44 1343069073
Am I having a permissions error, because the cron user doesn't own the store folder, or is it something else?