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

link|improve this question

22% accept rate
I also tried this /usr/local/bin/s3cmd put file s3://bucket (still no effect) – Jonar Dec 3 '10 at 15:26
feedback

1 Answer

Change

s3cmd put file s3://bucket

to

s3cmd put file s3://bucket > /tmp/s3cmd.log

That way you can see what kind of problem s3cmd is having.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.