It could still be a file/folder permissions error – I’ve definitely seen some installs where the core directory permissions are configured differently than the wp-content folder, where all of the plugins, themes and uploaded media live.
It sounds like the path to your document root may well be /var/www/html/ – that’s a very common path for a webroot, especially on an Ubuntu box. Have you tried updating the permissions on that directory and trying again? If you attempt this, you should probably keep track of the permission of the files and directories in the root directory, as well as the wp-content directory, so you can reset them to their original settings if needed.
For the sake of fun, here’s a heapin’ helpin’ of file permissions info, straight from the official wordpress site: https://codex.wordpress.org/Changing_File_Permissions — giving this a read may be worth while if permissions are indeed your problem. Plus it will tell you what your permissions should be, and why.
In case the above doesn’t work out – would you mind sharing whether you’re controlling permissions via Terminal, FTP Client or cPanel?
Hey thanks for your reply. I still haven’t managed to solve this issue despite reading through the article you linked.
I’m controlling permissions via terminal. If I knew which files/folders are handled during WordPress core upgrades I could see if those files/folders have the correct permissions set. Do you by any chance know which files/folders are relevant?
Thanks
I finally managed to fix this by temporarily changing the owner of all files within /var/www/html.
I normally set the FTP user as the owner and www-data as the owning group.
1) Change file owner
sudo chown www-data: -R /var/www/html
2) Update wordpress
3) Change back ownership
sudo chown myftpaccount: -R /var/www/html