Cannot open file for writing log in Joomla upgrade

An error has occured, fix permissions

You get the following notice when trying to use the button (one-click) update feature in Joomla.

Error notice

This is usually due to permissions errors or that you haven’t set your /tmp and /logs directory location(s) correctly in the Global Configuration. It is best to use the fully qualified location of those directories and you can find yours by temporarily uploading the following code into a file at the root of your hosting:

echo "Your absolute path is: " . getcwd();
$> Your absolute path is: /home/user1/public_html

Pre-fix your /logs and /tmp entries with the full path e.g. /home/user1/public_html/tmp