The Uploaded File Could Not Be Moved To Wp-content/uploads
Hi all, I'm having trouble uploading files to the Media library using either the browser upload or flash uploader. Lightbox Video Web Gallery Creator there. I receive this error: “test.jpg” has failed to upload due to an error The uploaded file could not be moved to /var/www/wordpress/wp-content/uploads/2013/05. I've found that if I give 777 or 757 permissions to the '05' folder the upload works correctly. I'm new to linux and am having trouble diagnosing why this isn't working with the standard 755 permissions.
Hello, If you are getting following error with wordpress while uploading images. The uploaded file could not be moved to /home/username/public_html/wordpress/wp.
My guess is that the 'user account' wordpress is using is NOT the root account which seems to be the owner of the directory. Does this make sense? Please help if you have a few minutes. IMO it would be better to keep the permissions as 755 and give ownership to the webserver account (www-data).
It probably doesn't make significant difference in the grand scheme of things but best practice is to keep permissions as tight as possible. Using 777 for testing is legitimate IMO, but there should be no need to leave permissions that loose in production. Root owned directories with 777 should have the same impact on WordPress as those dirs having 755 and owned by www-data. (FYI the 3 numbers refer to owner, group, others - 7 means read/write/execute; 5 means read/execute). So personally I would do this: chown -R www-data:www-data /var/www/wordpress/wp-content/uploads chmod -R 755 /var/www/wordpress/wp-content/uploads •.