WordPress.org

Support

Support » How-To and Troubleshooting » Unable to create directory – Is its parent directory writable by the server?

Unable to create directory – Is its parent directory writable by the server?

  • Hey guys,
    I’m having issues uploading images to to a post. I keep getting the following error:

    Unable to create directory /var/www/vhosts/domain.com/httpdocs/wp-content/uploads/2008/05. Is its parent directory writable by the server?

    /wp-content/ and /uploads/ are both CHMOD’ed to 777.

Viewing 15 replies - 31 through 45 (of 84 total)
  • I second blanketneworleans fix. It worked for me. I really do not like having WP-Content with full access. Anyway,

    I did this on IIS6, PHP5, and WP 2.6.

    Thanks blanketneworleans

    For my case, changing File Permissions of wp-content, NOT wp-content/uploads solves the problems.

    After reading everything – my fix was removing the /

    wp-content/uploads

    Not

    /wp-content/uploads

    Yep. Feckin WOW!~!!!!!!

    For me the solution was about the path.

    Looking at the ‘Store uploads in this folder’ path it was showing my full server file system path: /www/domainname.com/…

    Changing that to wp-content/uploads works fine.
    Also copying the content from a terminal path on the server fixes it and goes back to the short version: wp-content/uploads. This makes me think there was an error in there before but it’s changed and working now so I can’t say what it was or why.

    This is a very frustrating problem!

    I think it is a combination of permission and ownership thing.

    What worked for me: (not really a fix!)

    I manually created the follows directories: uploads/2008/08
    CHMOD them 777
    CHMOD wp-content to 777

    I manually made the directories, coz I got the error msg otherwise.

    Then on shell,
    CHOWN user:root /path/wp-content/
    CHOWN user:root /path/wp-content/uploads/

    This works on one of my blogs. The new images are created with user & group apache:apache. But it doesn’t work on my other blog. On the other blog, the images get uploaded, but are broken. I can’t access the images directly either! I don’t know if that is a htaccess or ownership problem? Anyone help !

    Romik84 wrote:
    Go to General Settings and in WordPress address URL field leave: http://yoursite.com. This one is wrong: http://www.yoursite.com.
    Forget about CHMOD and SafeMode bullshits. It’s a WP bug.

    Ok so how do I reverse this??? I figured I might try it out and now my f****** blog is totally messed up and I can’t log in..

    Heeeelp!!! See post above.. I’m desperate! *cry*

    elithraldor

    @elithraldor

    This all just seems stupid….

    CHMOD files/folders to 777 – what about no?

    And guess what? its the only thing that seems to work. I can’t do it ’cause of my provider. Fair IMO.

    So I tried everything else in this thread, but nothing is working.

    But what else is there to do?

    Last thing to do is just to use another blog-software! And go to McD or something..

    Just a little frustrated overhere.

    arminbw

    @arminbw

    This problem isn’t directly related to WordPress. Sometimes it’s safe_mode, open_basedir or simply the fact that providers do not use CGI. It really depends on the configuration of the server. If it’s done well, giving 777 permissions to user files isn’t necessarily a huge security hole as your whole workspace might be protected quite well. If the set up is bad, you are screwed anyway.

    And yes, this is frustrating indeed. The Web 2.0 isn’t actually a huge step forward in terms of security concepts.

    cstebner

    @cstebner

    One such solution would be to assign the proper permissions to the parent wp-content directory. If you are using a default apache install, that user and group are both ‘apache’ simply chown apache.apache -R wp-content. When you next use the upload scripts, the webserver will be able to create the directories.. no reckless chmod’ing here, just proper permissions in the proper places.

    YMMV

    arminbw

    @arminbw

    no reckless chmod’ing here, just proper permissions in the proper places.

    This only works if php save_mode is turned OFF.
    If it is turned off, what protects your directory from users on the server who are able to write php scripts?

    arminbw

    etorvinen

    @etorvinen

    Was having the same issue here http://eric.torvinen.net/blog/

    1. Login to your admin page
    2. Go to settings
    3. Go to Miscellaneous
    4. Find Store uploads in this folder
    5. Change it to wp-content/uploads

    I hope this helps everyone…

    this should fix the images… in my case i moved my wordpress install to another directory. This caused issues.

    You may also want to check the permissions of the uploads directory.
    which varies in different os/servers.

    Dancurranjr had it but I mis-read the post and didn’t get the benefit of this simple fix until later via another forum (hours later!) I did Bluehost live chat twice and though they were willing to help me they were unable. They had me doing all the complicated things that have been suggested here but in the end it was so simple!
    1. Login to your admin page
    2. Go to settings
    3. Go to Miscellaneous
    4. Find Store uploads in this folder
    5. if it says “/wp-content/uploads” just remove the first forward slash so that it reads plain ol: wp-content/uploads

    p.s. I only had this problem on the 1st of the month, so I don’t know if that means I will have to do that every month.

    Thanks so much. Taking the first forward slash off worked!! I am so happy.

Viewing 15 replies - 31 through 45 (of 84 total)
  • The topic ‘Unable to create directory – Is its parent directory writable by the server?’ is closed to new replies.