• Hi All,

    OK, the 5 minute innstall issue is becoming a 3 day nightmare?! I can now upload files AOK after changing permissions but when I check the “Organize my uploads into month- and year-based folders” box it errors with the following error:

    “Unable to create directory /var/www/vhosts/[mydomain]/httpdocs/wp-content/uploads/2009/03. Is its parent directory writable by the server?”

    What is up with that? It is clear that WP/Apache/PHP can write to the root of wp-content/uploads but when it goes any deeper it fails?!

    If I uncheck the value it works? FYIW, I am using Plesk 8.6 / Debian.

    Anyone?

    Thanks

    Tony

Viewing 15 replies - 1 through 15 (of 29 total)
  • Try this: WordPress Troubleshooting: Permissions, CHMOD and paths, OH MY!.

    I really dislike that permissions have to be set as high as they do.

    This is really easy

    Using your FTP software, change the permissions setting for the ‘uploads’ folder, and all subsequent directories beneath it, to 777.

    In Filezilla for example you simply right-click the folder ‘uploads’, type in ‘777’, and check the box which says ‘Recurse into subdirectories’.

    This allows WordPress to write not just to the ‘uploads’ folder, but to create folders like ‘2009’, ’03’, ’04’, etc., and write to them too.

    The point is you should only have to do that once. Then you should be able to go back to 755 chmod as 777 is insecure.
    Maybe talk to your host about this as most servers do not require this behavior.

    Ah ok, I really can’t help then. Sorry.

    this is caused by the wrong path in settings for “store uploads to this directory”

    [link moderated, please place pertinent information in Codex]

    Nabtron, Thanks a lot!

    Thanks

    [link moderated, please place pertinent information in Codex]

    If you tryed everything and upload in your wordpress still doesn’t work – i have an answer for you. In short: php safe mode won’t let you create files or directories if your php scripts and upload directory belongs to different users. So there are 2 possible solutions: either disable php safemode (not recommended), or change an owner of scripts and upload directory:

    cd blog_root
    chown -R apache:apache *

    [link moderated, please place pertinent information in Codex]

    I was having similar problems. Setting the permissions on the uploads directory to 777 did indeed solve the problem, but this was not a security hole I was willing to overlook. I did do some testing with 777, however, before switching back to 755, and found that the “nobody” user was actually responsible for moving the pictures into the directory. Since the nobody account doesn’t have write permission (unless the directory is set to 777) wordpress was complaining.

    To see if this is your issue, switch the folder to 777, and upload a picture. Then check to see who is the owner of that picture. If it is “nobody” then you are having a similar issue here.

    There are two solutions.

    If you have (root) access to the command chown — you can use that command (see sergee’s post above) to change the owner of that directory to “nobody”.

    Alternatively, if you do not have access (I didn’t), then you need to email your system administrator and have them help you (they actually switched me over to suPHP which allows my user account to run all the necessary scripts instead of “nobody”).

    I think this is certainly a more responsible action than just setting a public folder to 777.

    @nabtron: simple & easy fix – last week our website blew up and changed servers, re-writing the name of the dir the blog and uploads were in.

    i went into Miscellaneous Settings as instructed and changed the dir back to “wp-content/uploads” and all was restored!

    thank you!

    i am glad that it helped you! 🙂

    Okay, this is all I needed to fix this:

    hello tan,

    please make sure it is “wp-content/uploads” and not “/wp-content/uploads”

    waiting to know if it was still not solved.

    My default had the slash in front. Amazing. I didn’t need to change permissions or anything.

    Thank you,
    TRL

    Thanks all, this was a very helpful thread. This seems like a common problem.

    I had ported my site from a build on the local host in xampp to it’s current location. And in the path settings for store uploads I had left “C:\” in front of “wp-content/uploads”

    I was fussing around for about 30 mins trying to figure this out, annoying.

    Don’t make the same mistake twice, eh?

    BTW someone should mark this topic as resolved, very helpful when searching.

    n.

    I had this problem when my Web host “upgraded” my account. I followed Nabtron’s advice, and noticed that the Miscellaneous Settings had the “store uploads to this directory” with a full path instead of just “wp-content/uploads.” I only left “wp-content/uploads” in that field and saved the changes and that fixed the upload problem! Settings> Miscellaneous from the Dashboard and make the change. Thx Nabtron!

    I’m having this problem and I’ve checked the wp-content/uploads setting and it seems correct… is there anything else at play here?

    thanks

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