When WordPress installs plug-ins or updates, it will prompt that the directory creation fails
Enter the WordPress working directory, use the ls-l command to view the file details in the WordPress working directory, and you can see the working group.
[root@host wordpress]# ls -l total 196 -rw-r--r-- 1 root root 418 Oct 9 10:35 index.php -rwxrwxrwx 1 root root 19935 Oct 9 10:46 license.txt -rwxrwxrwx 1 root root 7415 Oct 9 10:46 readme.html -rwxr-xr-x 1 root root 5458 Oct 9 10:35 wp-activate.php drwxr-xr-t 9 root root 4096 Oct 8 19:43 wp-admin -rw-r--r-- 1 root root 364 Oct 9 10:35 wp-blog-header.php -rw-r--r-- 1 root root 1889 Oct 9 10:35 wp-comments-post.php -rw-r--r-- 1 root root 3294 Oct 8 19:43 wp-config.php -rwxr-xr-x 1 root root 2853 Oct 9 10:35 wp-config-sample.php drwxr-xr-t 6 root root 4096 Oct 8 19:43 wp-content -rw-r--r-- 1 root root 3669 Oct 9 10:35 wp-cron.php drwxr-xr-t 18 root root 12288 Oct 8 19:43 wp-includes -rw-r--r-- 1 root root 2422 Oct 9 10:35 wp-links-opml.php -rw-r--r-- 1 root root 3306 Oct 9 10:35 wp-load.php -rwxr-xr-x 1 root root 37794 Oct 9 10:35 wp-login.php -rw-r--r-- 1 root root 8048 Oct 9 10:35 wp-mail.php -rw-r--r-- 1 root root 16246 Oct 9 10:35 wp-settings.php -rw-r--r-- 1 root root 30091 Oct 9 10:35 wp-signup.php -rw-r--r-- 1 root root 4620 Oct 9 10:35 wp-trackback.php -rw-r--r-- 1 root root 3065 Oct 9 10:35 xmlrpc.php
As you can see above, they are in the root working group, and we need to update the download operation in the Web group, namely the user group www.
Modify it below
[root@host wordpress]# chown -R www:www ./
Then view the user group again
[root@host wordpress]# ls -l total 196 -rw-r--r-- 1 www www 418 Oct 9 10:35 index.php -rwxrwxrwx 1 www www 19935 Oct 9 10:46 license.txt -rwxrwxrwx 1 www www 7415 Oct 9 10:46 readme.html -rwxr-xr-x 1 www www 5458 Oct 9 10:35 wp-activate.php drwxr-xr-t 9 www www 4096 Oct 8 19:43 wp-admin -rw-r--r-- 1 www www 364 Oct 9 10:35 wp-blog-header.php -rw-r--r-- 1 www www 1889 Oct 9 10:35 wp-comments-post.php -rw-r--r-- 1 www www 3294 Oct 8 19:43 wp-config.php -rwxr-xr-x 1 www www 2853 Oct 9 10:35 wp-config-sample.php drwxr-xr-t 6 www www 4096 Oct 8 19:43 wp-content -rw-r--r-- 1 www www 3669 Oct 9 10:35 wp-cron.php drwxr-xr-t 18 www www 12288 Oct 8 19:43 wp-includes -rw-r--r-- 1 www www 2422 Oct 9 10:35 wp-links-opml.php -rw-r--r-- 1 www www 3306 Oct 9 10:35 wp-load.php -rwxr-xr-x 1 www www 37794 Oct 9 10:35 wp-login.php -rw-r--r-- 1 www www 8048 Oct 9 10:35 wp-mail.php -rw-r--r-- 1 www www 16246 Oct 9 10:35 wp-settings.php -rw-r--r-- 1 www www 30091 Oct 9 10:35 wp-signup.php -rw-r--r-- 1 www www 4620 Oct 9 10:35 wp-trackback.php -rw-r--r-- 1 www www 3065 Oct 9 10:35 xmlrpc.php
When WordPress is updated, it succeeds