Files need proper permissions AND the correct owner in order for wordpress to update properly.
From WordPress’ website files and folders “need to be owned by the user under which your Apache server executes”. To find out what the owner should be type:
ps auxw | grep -E ‘http|apache|www’
or
ps auxw
most likely, if you’re running linux it’s www-data
I’ve racked my brain for months trying to figure out what the problem has been. Not exactly sure when they got changed.