WordPress's "unable to move uploaded files to" error solution: wordpress Solution
I uploaded images to my blog on the webpage today. The result is: "The uploaded files cannot be moved to/home/wwwroot/wp-content/uploads/2013, I think it is a permission issue. I changed all my files to 777 permissions, but they still cannot be written and Images cannot be uploaded.
Simply, I checked the permissions of the root directory folder of my website, and the permissions are www and www, while ps aux | grep nginx displays the nginx subroutine running as nobody, ps aux | grep php-fpm, also displays nobody. At the same time, I found that the permissions for other files and folders on my website are root and root. This may be because I copied the file directly as the root user last time. Therefore, the root file cannot be modified as the nobody user.
The method is as follows:
Step 1:
First, the running identities of nginx and php-fpm subprograms are changed to www, and the user group is also changed to www.
Modify the nginx. conf file and Change user nobody to user www;
Run the following command:
Service nginx restart // restart nginx
Modify the php-fpm.conf
user = nobody group = nobody
Changed:
user = www group =www
Run the command: service php-fpm reload // restart php-fpm
Step 2:
Modify all folders and files to www, www
#chown -R www:www /wwwroot
Upload the image again, prompting you That the upload is successful and the problem is fixed.
There are also some other methods on the Internet, such as changing the image to the English name or the folder to 777. In fact, in many cases, the permission is 777, but it still cannot be uploaded. You can consider whether it is the file owner.