Upgrading to Magento 2.3.1 from 2.3 giving error

My Setup

  1. Dedicated Server at Digitalocean
  2. I setup the server myself
  3. Ubuntu 16.04, Apache & PHP 7.2
  4. Magento 2.3

What I’m trying to do

I’m trying to upgrade via the Web setup wizard it is giving me an error “Cron script readiness check failed” and " Found non-writable path(s):
/var/www/html/var/.htaccess" I’ve pressed “Try Again” a few times but I keep getting the same error message. I have also tried to give permissions to var folder and other commands but it does not resolve.

It’s either an Ownership or Permission issue with the /var/www/html/var/.htaccess file.

This article I wrote will help you fix that: How to diagnose and fix Ownerships and Permission issues