• Resolved christian-s

    (@christian-s)


    I have real difficulties getting the media upload functionality to work. I’ve searched this forum and google and read several posts on the topic with various solutions, but so far not found a solution.

    When I try to upload a file (jpg, pdf) using the media manager I get the following error message:

    “test.jpg” has failed to upload due to an error
    Unable to create directory /usr/local/www/domainname/www/blog/wp-content/uploads/2010/06. Is its parent directory writable by the server?

    In wp dashboard > Settings > Media: Store uploads in this folder “wp-content/uploads”.
    Organize my uploads into month- and year-based folders: ticked.

    The wp-content/uploads directory has permission 755. I have tried with 775 and this did not help either. I can put the folder to 777 with recursion for subfolders and then be able to upload files. But 777 is a bad idea. I can change wp-content/uploads back to 755 and upload images but then all subfolders like “2010/06” will each have 777 for folders and 666 for files.

    If I create wp-content/uploads/2010/06 manually and assign 755 for folders and then try to use the media uploader I get error message
    The uploaded file could not be moved to.

    If I create a new directory “wp-content/stuff” and set it up on the dashboard, settings > media I have the exact same problems as with
    “wp-content/uploads”, ie the upload only works with folder permission 777.

    I guess the reason I having problems with permissions 755 for folders and 644 for files has something to do with the way the host has setup php, apache etc.

    The host is not using mod_security and are has safe_mode=off.

    Any ideas what I should be looking at on the host settings for php/apache?

Viewing 7 replies - 16 through 22 (of 22 total)
  • change the owner of uploads/ and the sub dir. to your apache running user, usually “www-data”. That will fix this issue.

    never ever try 777!!!

    deleted

    I suggest you turn off Organize my uploads into month- and year-based folders because you are going to have a problem with permissions every month when a new directory needs to be created. Just let them all go to /wp-content/uploads.

    I had this problem, here is how I’ve fixed it.
    Change the group of your wp files to ‘web’. SSH into your site and from the directory you’ve installed wordpress to, type :

    chgrp -R web wp-admin

    It Is supposed to be deprecated but worked.

    Hey guyz .. i was having same issue.. and i was keep trying and trying for constantly 3 hrs to solve this silly issue.. even I talked to my host provider they say we now allow 777 .. i said oops now big trouble.. but i just tried out my logic and it works completely fine…it works for me you ppl should try may be it can work for you too…

    My setup:

    WordPress is on public root
    Custom folder is on public root but that is a subdomain directory media.mydomain.com

    Now as usual I tried first
    Store uploads in this folder: public_html/media
    Full URL path to files: media.mydomain.com

    And here is the problem…. here server or wordpress may be consider outsider is trying to access (I guess. So its required 777 or at least 775 permission. So as my subdomain directory and wordpress at the same place I have just use only directory name. So here below I have entered value into the filed.

    Store uploads in this folder: media
    Full URL path to files: leave blank

    and it works fine without any issue same like wp-content directory..if you have installed wordpress in other directory still you can try with may be ../ or similar without using public_html

    It works for me.. and believe it may works for you too.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘WP3.0 Media Uploader “Unable to create directory”’ is closed to new replies.