If you’ve installed WordPress on OS X and receiving the error:
“somefile.jpg” has failed to upload due to an error
The uploaded file could not be moved to /pathtouploadsfolder/
Then the following fix might help.
The problem is due to the fact that WordPress runs as user “_www” on OS X and the permissions need to be set correctly. This same permissions problem will also affect your ability to install and update plugins and update WordPress.
Let’s fix it.
Open terminal and change directory to just above your WordPress site:
cd /Users/Username/Sites/
Assuming your WordPress site is in a directory called “wordpress”, type the following:
sudo chown -R _www wordpress
Terminal will then prompt you for a password with the privalages to make the change (i.e. root).
Next, type the following:
sudo chmod -R g+w wordpress
That should fix it. “Get Info” on the WordPress folder and you should see that the owner has changed:

Notice the _www user has Read & Write permissions now.
You should now be able to upload files.
Note: Frequently, my website project folders have spaces in them. e.g. “WordPress 3.1″. If this is the case with your installation, then terminal will tell you it can’t find the path. Surround your folder name with “” (quotes), and that will fix the problem:
cd /Users/Milkman/Sites/
sudo chown -R _www “wordpress 3.1″
sudo chmod -R g+w “wordpress 3.1″



Whoaa! Great Post! I was stuck on uploading error from my wordpress page, and your tutorial to set the folder permission setting is saved me.
Thanks a million!
Oh btw, I wish you write something else about, Virtual Host setting
Worked fine.
Thanks!