I am running an Ubuntu EC2 instance as an "ubuntu" user.When I create a cron job for checking the mysql status saving the logs in /var/log/filename.log,I receive a mail(via installed postfix) and the log states: "cannot create /var/log/filename.log:permission denied".When the cron job is created to save logs in /home/ubuntu/filename.log and the ownership has been changed for the /var/log/filename.log, no mails were received.
My path variable: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
What is the best way to see my cron job's message?