WordPress.org

Ready to get started?Download WordPress

Forums

Unable to create directory - Is its parent directory writable by the server? (85 posts)

  1. Matt
    Member
    Posted 5 years ago #

    Here's what worked for me, after much messing around. Note I have root access to my Linux/Apache server, so I can run chown commands. In shared hosting environments, you'll simply have to ask your tech support to do this. Shouldn't be a big deal.

    directory - permissions - owner/group

    wp-content drwxr-xr-x (755) apache apache
    uploads drwxr-xr-x (755) apache apache

    but

    themes drwxr-xr-x (755) casey psacln

    ...so that I can modify my theme with my FTP client and text editor of choice. If themes was apache apache, I would not be able to edit my template(s).

    This works fine, and I can upload/save/delete at will with the WP 2.7 Flash uploader.

    PHP safe_mode is ON.

  2. Matt
    Member
    Posted 5 years ago #

    Ack, too much posting, not enough testing. I came back to my site just now and the wp-content/ directory being owned by apache had made my pages blank. SO, the above post is correct only with these two fixes:

    wp-content drwxr-xr-x (755) casey psacln
    and
    PHP safe_mode is OFF

    Please note my user casey of group psacln will differ from yours. Typically, the user will be whatever your FTP login is. In other words, don't use "casey", "psacln" or even "apache". Change these to fit your environment.

  3. carlapen
    Member
    Posted 5 years ago #

    I had a different twist on this problem. My web server would not let me create, via FTP, the wp-content/uploads folder. I kept getting permission denied. I tried so many other solutions, but finally I went into the web host's file manager, and for some reason, I could create the folder there. The chmod needs to be 755 as several others have stated.

    What I learned is that you cannot change the path to something other than wp-content/uploads. This was one way I tried to get around the problem, since I could create an uploads folder under other folders, just not wp-content. But this path is built into the program, so you just have to figure out how to get that exact path built on your server.

    My web host is Startlogic.com and even with a support request, I don't believe they ever even understood my problem. The solution ended up being pretty simple. I wish I had started with that file manager.

  4. Matt
    Member
    Posted 5 years ago #

  5. actionmedia
    Member
    Posted 5 years ago #

    I'm having a hard time figuring this out. I can only upload images if I set /uploads to 777. That is NOT a resolution. I already checked my files, and the owner is set correctly. I have full root access to my server. All paths are set correctly. All dir's chmod'd appropriately. This definitely appears to be a bug.

    Has there been a resolution to this problem? I really don't like the idea of chmod'ing a dir to 777, that is not safe.

    Any help is greatly appreciated.

  6. Matt
    Member
    Posted 5 years ago #

    PHP safe_mode?

  7. actionmedia
    Member
    Posted 5 years ago #

    Can I do that w/ an .htaccess file? If so, do you know the code? :)

  8. Matt
    Member
    Posted 5 years ago #

    I think it's a php.ini thing.

    Use The Google.

  9. muymalestado
    Member
    Posted 5 years ago #

    As anonymous said 7 months ago in 'I BELIEVE I HAVE FOUND A SOLUTION!'

    entering full urlpath and 777 on uploads and wp-content does the trick
    using 2.7.1

  10. Matt
    Member
    Posted 5 years ago #

    Problem is, everyone's trying to avoid 777. It's a security hole.

    Actionmedia, also look for PHP safe_mode checkbox in your hosting control panel.

  11. akv2
    Member
    Posted 5 years ago #

    Here was the fix for us. We changed our permissions on the 'uploads' directory to 755 recursively (-R). We also realized that our apache user was different than our server admin user (and different than root) [Note: run 'top' in the command line to see what user is running apache]. That means that when we changed our permissions we were not doing it for the user that was pulling the error. We had to add our apache user to our server admin group so they would receive the permission changes.

    * Do some research on this command before using *
    usermod -a -G {group_name} {username}

    I'm not saying that this is the fix for everyone, as everyone's server configurations are different... but I did want to share what was the fix for us.

  12. TheDogBox
    Member
    Posted 5 years ago #

    I had the same problem. I had just uploaded a site which I developed locally using XAMMP. Everything was final locally, and it looked fine once I had uploaded it to my GoDaddy hosting (whih hosts other WP sites, all working fine).

    Then I noticed I couldn't upload media to the hosted site. Checked all the folder permissions against another of my site which was working fine, and all the content folders were 705.

    Then I noticed the post about the 'Store uploads in this folder' setting. So I checked my Misc settings and found it was set to '/wp-content/uploads'. I changed it to 'wp-content/uploads' (i.e., no leading slash) and presto, now I can upload media!

  13. sassymonkey
    Member
    Posted 5 years ago #

    Like a few others in this looooong thread, I fixed this problem by only changing one thing: I somehow had "/wp-content/uploads" instead of the default "wp-content/uploads" in the Settings -> Miscellaneous -> "Store uploads in this folder" field.

    Funny thing though: all the while I was getting the errors, I kept getting complaints about no access to the wrong date folder (2008/11). It should have been complaining about no access to the current year and month (2009/03).

    Once I removed the initial "/", the upload worked and, sure enough, it put the file into 2008/11. Yet, it created a new folder in 2009/03 but didn't put it there in favor of 2008/11!

    Strange. It's annoying and will probably cause me some future neck-pain but at least it's working.

  14. rgority417
    Member
    Posted 5 years ago #

    PHP Safe mode was on, I turned it off, smooth as silk now....

    Thanks!

  15. chiranjeeb
    Member
    Posted 5 years ago #

    I started getting the “Unable to create directory /wp-content/uploads/2008/12. Is its parent directory writable by the server?” error when uploading or inserting image into a WordPress post just after upgrading to WordPress 2.7. First I thought it is a directory permission related error so I tried changing the permission of my ‘upload’ directory to 777 but I was still having the same problem. After trying many things I was able to fix it using the following method.

    1. Log into your WordPress Admin account.
    2. Go to ‘Miscellaneous’ Settings options from the ‘Settings’ menu.
    3. In the Miscellaneous Settings put

    wp-content/uploads
    in the “Store uploads in this folder” text box.
    4. Save the Changes by hitting the “Save Changes” button and you are done.

  16. weboart
    Member
    Posted 5 years ago #

    I have a Windows 2003 and the path in Misc Settings was set to: /home/mysite/mysite.com/blog/wp-content/uploads

    I got an error messages asking me to remove the "/" before the path. So it would be: home/mysite/mysite.com/blog/wp-content/uploads

    This corrected the issue for me. Hope that helps.

  17. husnibatam
    Member
    Posted 5 years ago #

  18. Matt
    Member
    Posted 5 years ago #

    Can someone please help me. I have tried everything mentioned in this string of replies (CHMOD 777 - which I did so reluctantly, changing the .htaccess file, removing the slash in front of my directory and such) and still to no avail.

    Can someone please, please (hopefully a WP developer themselves) answer this for once and for all.

    Thank you.

  19. droolinc
    Member
    Posted 5 years ago #

    I cannot get any of the endless thread fixes, changes, adjustments, or advice to work either. I've done them all, I've read and reread the many threads and I still get the same message all of us get that have this issue. Is it possible, I'm not doing the one I need correctly? Yes, but I doubt it. I've tried ALL OF THEM repeatedly over many days.

    I've also switch from FF, S, IE (which won't load at all) to Camino for browsers and that didn't help either.

    My gut is that this is a Mac issue as that is what I'm using. I'm running OSX 10.4.11 with 2x3 GHZ Dual-Core Intel Xeon. Maybe it's still a Flash 10 issue and like EVERYONE the Flash loader doesn't load either. Everything else works on my droolinc.com WP site accept loading media.

    I'm so close to abandoning WP for good.

  20. droolinc
    Member
    Posted 5 years ago #

    It's a permission error.
    Godaddy doesn't allow the upload to write. You can change the permissions in the File Manager under permissions for uploads in your wp-content directory. Web Writable and Web Visible. It uploads now and stores the file in the uploads folder under date and month, but not through the Flash uploader, just through Browser uploader.

    New issue, I no longer have a site. My entire site is blank, even after changing the permissions back to inherit and web visible.

    This is ridiculous.

  21. droolinc
    Member
    Posted 5 years ago #

    "The active theme is broken. Reverting to the default theme."
    That was the message in my WP Admin dashboard page under Themes and why I no longer could see my site.

    Now I have a site up again with the WP default theme. It's possible the Theme's folder permissions were changed or the wp-content where the Themes folder is on the server's permissions changed.

    Update: The Theme was no longer in the wp-content/themes folder on my Godaddy server. So I uploaded it again and now the image is gone. It's gone from the WP Default Theme too when it is changed back. I deleted the Theme and it reverted again to the WP default theme and bang the image is back up and the site works, so maybe this is also a Theme issue? I'll try monkeying with the Theme permissions tomorrow.

    But the site is back up. The image is finally loaded in the proper place and visible.
    Now to see if I can get the proper theme back up, but I'm now also having issues with the icon images in the WP dashboard window. There are none.

    I hope this has been helpful. I'm getting loopy now.

  22. icehawk55
    Member
    Posted 5 years ago #

    I don't know how it happened. But I do know what's going on. All my files are now trying to upload as user nobody and group bin, when before it was my username and group users. Something in the apache broke I believe.

    Changing permissions to 777 as some have suggested is a really really bad idea from a security stand point.

    Will get with my provider and see if they have done something odd with apache lately.

    Oh the fun. Oh the joy.

    Icehawk

  23. digitalrenewal
    Member
    Posted 5 years ago #

    THIS, THIS, do THIS...
    chiranjeeb figured it out about 8 posts ago.

    1. Log into your WordPress Admin account.
    2. Go to ‘Miscellaneous’ Settings options from the ‘Settings’ menu.
    3. In the Miscellaneous Settings put

    wp-content/uploads

    in the “Store uploads in this folder” text box.
    4. Save the Changes by hitting the “Save Changes” button and you are done.

  24. digitalrenewal
    Member
    Posted 5 years ago #

    & dont 4get to chmod the uploads dir back to 755

  25. droolinc
    Member
    Posted 5 years ago #

    Actually that is not relevant to my situation. As I said, I went through all the threads and attempted all the changes. That setting was correctly set up by WP in the first place.

    This seems to be a permissions and a FFox browser issue, as the upload photo appears in Safari, but not FF.

    Secondarily is seems to be a host issue, as Godaddy on another thread has now said: "The free ad-supported hosting may have difficulty interacting with some applications."

    Huge waste of time, godaddy that is.

Topic Closed

This topic has been closed to new replies.

About this Topic