Like many, I've been having trouble getting my uploads folder (in this case, the directory is called "assets" and sits at the root level) to allow me to add media without changing permissions to 777. I do have a private server though, to which I have root access. But unfortunately I inherited what appears to be a rather poor setup, and I'm very new to Linux, so I'm trying to learn how to get this set up right.
I followed the instructions on this page: http://wordpress.org/support/topic/media-upload-problem-the-uploaded-file-could-not-be-moved-to-error/page/2?replies=42 When I look for the "User/Group" listed under apache2handler, I see "www-data(#)/#". But the SFTP user that I've been using is called "mercury".
When I changed the "mydomain.com" WP root directory to the "www-data" user, and changed the "assets" folder to 766, I was finally able to upload media. But then my SFTP no longer allowed me to change files.
If I change the user back to "mercury", I can SFTP, but can't upload media.
How can I set it up so that both my SFTP user (preferably "mercury") and the owner for the WP directory are the same? Are there any files in the WP directory that need to be in the "root" group?