The Wordpress plugin and core version upgrade failed, and when I was looking for the cause, I found that it could be avoided by changing the folder permissions. I will summarize the procedure.
When I try to update the plug-in in the standard KUSANAGI Runs on Docker environment, the error "Update failed: The directory could not be created" appears and the version upgrade fails.
Kusanagi RoD is usually installed in any folder under / home/kusanagi
.
The permission of the folder at that time is 755, which seems to be the cause.
When upgrading, temporarily change the folder permissions to 777.
By the way, change the file permissions to 666.
# cd /home/kusanagi/puroject
# find . -type d -exec chmod 777 {} +
# find . -type f -exec chmod 666 {} +
Now the permissions have changed.
# ls -al
total 28
drwxrwxrwx 6 kusanagi 1001 4096 Aug 5 05:54 .
drwxr-x--x 3 kusanagi 1001 4096 Oct 11 03:31 ..
drwxrwxrwx 5 kusanagi 1001 4096 Dec 20 14:25 DocumentRoot
drwxrwxrwx 2 kusanagi 1001 4096 Jul 16 10:24 settings
drwxrwxrwx 2 kusanagi 1001 4096 Aug 5 05:54 tools
drwxrwxrwx 4 kusanagi 1001 4096 Jul 16 10:24 wp-config-sample
-rw-r--r-- 1 kusanagi 1001 3351 Oct 11 03:44 wp-config.php
This time it was successful!
Don't forget to restore the permissions as it is loose for security. Although it is described in another entry, if you do not set the uploads folder to 775, image upload will fail, so update this as well.
# find . -type d -exec chmod 777 {} +
# find DocumentRoot/wp-content/uploads -type d -exec chmod 775 {} +
Recommended Posts