s3cmd run on command line not on cron
- by Jonar
Many have said that the problem is with environment but I still can't seem to solve this problem.
BTW I am using Ubuntu 9.10
login as user, then sudo -s
using this command: s3cmd put file s3://bucket worked!
now here is the simple script intended for testing:
#! /bin/bash
env >/tmp/cronjob.log
s3cmd put file s3://bucket
issuing the command crontab -e
* * * * * /opt/script 2>&1 | logger
Then using tail to syslogs
Dec 3 23:22:01 ubuntu CRON[10795]: (root) CMD (/opt/script 2&1 | logger)
But by verifying it on s3Fox Organizer, the file is not uploaded.
(I tried changing the #! /bin/sh (no effect), putting crons on /etc/crontab (no effect), setting HOME=/home/user (no effect)
What are other options to try? Or other ways to debug this problem.
Thanks