Skip to main content

WordPress: Upgrade error due to inconsistent file permission

While upgrading WordPress running on Microsoft Windows Server 2012 R2 from 4.6 to 4.7, I ran into error about file permission.

In short,
  1. TEMPORARILY add WRITE security permission to IIS_IUSRS local group for wordpress folder
  2. Run upgrade successfully, then
  3. Remove WRITE security permission of IIS_IUSRS local group from wordpress folder.
WordPress: Temporary security persmission settings to upgrade

Downloading update from https://downloads.wordpress.org/release/wordpress-4.7-new-bundled.zip
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

Check PHP error log: C:\Windows\Temps\PHP70x64_errors.log

[19-Dec-2016 12:04:29 UTC] PHP Warning:  copy(C:/wordpress/wp-admin/includes/update-core.php): failed to open stream: Permission denied in C:\wordpress\wp-admin\includes\class-wp-filesystem-direct.php on line 257

Downloading update from https://downloads.wordpress.org/release/wordpress-4.7-new-bundled.zip
Unpacking the update…
Verifying the unpacked files…
Preparing to install the latest version…
Enabling Maintenance mode…
Copying the required files…
Disabling Maintenance mode…
Could not copy file.: index.php
Installation Failed
WordPress.com

Popular posts from this blog

Linux command: lastlog

lastlog command reports the most recent login of all users or of a given user. NAME lastlog - reports the most recent login of all users or of a given user SYNOPSIS lastlog [options] DESCRIPTION lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd. OPTIONS The options which apply to the lastlog command are: -b, --before DAYS Print only lastlog records older than DAYS. -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -t, --time DAYS Print the lastlog records more recent than DAYS. -u, --user LOGIN|RANGE Print the ...

Powershell: Get-ChildItem

List, search/find files and directories with Get-ChildItem cmdlet.

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...