I have a Wordpress installation that refuses to auto update using the standard update button in the dashboard. The error received is:
"Unpacking the update… The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php….. Installation Failed"
Warning: copy(/var/www/html/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /var/www/html/wp-admin/includes/class-wp-filesystem-direct.php on line 281
Information about the site:
- On Google cloud's Compute Engine
- Appropriate public key and firewall entries to allow access for DB, ssh2, etc. from local desktop
- Site runs with Apache, PHP 7.3, MariaDB on a Centos 7 system
- All functions except for the update run fine. This includes all normal pages, posts, etc. and the plugin updates
- All file permissions are set to 664, folder to 775 as recommended by Wordpress
- In the wp-config file there is "define('FS_METHOD','direct');"
- Wordpress user is "apache"
- FTP user is "ftpusername"
- ftpusername belongs to group ftpusername as does apache
- All files and folders are owned by apache
- All files and folder belong to group "apache"
Access to the site is by SFTP Filezilla with user "ftpusername" and private key. SSH is using MobaXterm using the same user and private key
I need to determine what user the Wordpress update process thinks it is since it is not the user that runs all the other pages and posts as I have all files and folders owner by apache.