Permission denied error in cron jobs log

On an EC2 Ubuntu instance, the standard ownership for /var/log is root:syslog.

If you want your ubuntu user to be able to create files in /var/log, you need to add the user to the syslog group.

usermod -aG syslog ubuntu

You need to log out and log back in for the new group permissions to take effect.

Be very careful. Giving elevated permissions to your standard user is generally a bad idea. If you have permission to create files in /var/log you also have permission to delete them, which can hurt other things. Consider storing your logs in some location other than /var/log. If they must be there, consider creating a new user to run the background jobs and giving that user the needed permissions or, alternatively, placing the jobs in the standard system cron spaces, which already possess the needed permissions.