• I am using the latest/greatest WP (2.5.1 on SBS 2003 with IIS, MySQL, and PHP 5) and when I try to upload a media file I get an error. At first the error said that the particular folder was not available so I manually created it on the server. Now I get an error which claims the folder-area is not writable:

    Unable to create directory C:\[Path]/wp-content/uploads/[Date]. Is its parent directory writable by the server?

    I have made certain that this folder area is inheritting permissions from its parent (all the way up the line to the root WP folder). All the rest of WP is working as expected (ie: I am able to write posts and drafts and so forth).

    I did find this forum post where this issue was discussed (briefly):

    https://www.ads-software.com/support/topic/167725

    I suppose I can give IIS write permissions to this folder area, but making this kind of change always makes me nervous. IIS and WP have been able to write posts and alter PHP documents just fine.

    Why should I need to give IIS more permissions because the type of data being saved is media (mp3, jpg, &c.) and not merely text?

    What is the preferred method for dealing with this issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I think you need to give more permisions because wordpress needs to create subfolders and store files and text (posts) are stored in a MySQL DB, not at your wp folders directory.
    Create the “uploads” folder and give it enough permissions…

    Thread Starter jamesisin

    (@jamesisin)

    Xamataca – I can relate to that. But what is the preferred method for my setup? Do I really want to give write permissions to IIS? It seems right, but I’m not a security expert and I’d like to not become a security fool.

    If you want wp to create folders inside /uploads and store files using its frontend then I’m afraid it’s what you have to do.
    https://codex.www.ads-software.com/Using_Image_and_File_Attachments

    In order to use all these tools, you have to change the chmod of wp-content folder to 777. If you have not changed permissions in order to write in wp-content folder, you will not be able to use the uploader. If you do not know how to change this value, please read Changing File Permissions.

    https://codex.www.ads-software.com/Changing_File_Permissions
    https://codex.www.ads-software.com/htaccess_for_subdirectories

    Thread Starter jamesisin

    (@jamesisin)

    Xamataca – Thanks again.

    I had to give the Internet Guest Account Write permissions (rather than IIS) in order for this uploading to work. This of course makes me very nervous. (I did turn off scripting for this part of the folder-tree.)

    Two things. First, do you know if there is a way to limit this permission set to those visitors on my local (VPN) network?

    Second, do you know if something similar is what’s causing this issue:

    https://www.ads-software.com/support/topic/187786

    I seem to have the same problem as James and quite a few other folk, with error messages about folders not being writable.

    I can’t help thinking that I must be missing something here when it comes to server permissions, because IIS didn’t work for me even after I changed the contents folder and uploads folder to 777. I have hosting space on Linux servers run by Names in the UK: their advice on permissions is that nobody should ever need to set anything higher than 755.

    So do I have a hosting permissions problem or a WordPress problem?

    At intervals over the past few weeks, I’ve been trying to upload photographs into a WordPress blog that I host, only to get an error message that the directory is not writeable (by the Flash uploader) while the browser uploader just stops even trying after five seconds or so and sits there waiting for something more productive to do. Not even an error message, it just times out.

    So far I have tried some of the simpler or more obvious remedies: you want writeable? Fetch can do writeable, so I turn off world-executable, just in case, and try again. The target folder, the parent folder both get nudged up to 776. No change.

    These are only permissions, anyway, so I try 777 for the target upload folder, the parent folder, what the heck, 777s all round. Still no dice. OK guys, back to 755 while we try and figure this one out.

    Now my FTP client can leave the door open on pretty much any folder, leave the keys on the table, whatever. But none of this changes anything for either of the uploaders, so where are they reading their permissions from?

    More worryingly, I can export a backup file out of wordpress.com, but I can’t upload it into my hosting space: inadequate access rights to make a temporary folder and write scratch files. Doh.

    The uploaders are getting a resounding NYET from somewhere, but if they can’t fight their way through an open door, there’s not a lot of point in tempting fate, either.

    SO, my question is this: if my FTP client is setting a whole load of permissions for file transfers that are not found by the uploaders, do these processes have permissions allocated as well? That might help to explain why 777 works for an FTP client but still generates a denied access for a different application/process.

    Do folder permissions respond differently to access requests from different ports, for instance? Do I need to set four digit permissions?? Even though I have logged in to use the WordPress console, the uploaders do not seem to have the access rights that match my login status.

    How come my login doesn’t propagate the necessary permissions for some processes to work downstream from my login?

    More confusingly, if I try a primitive workround and use an FTP client to upload files, Flash cannot ‘see’ anything in the uploads folder, let alone stitch anything into a page. I suppose I could write links to files in situ, but it rather defeats the point of using themes that rescale full size pix into thumbnails on the fly.

    I’m not trying to be awkward, there really does seem to be a problem with reality here. It’s just that even after years of password-free network logins around the office LAN, I still reckon that it’s not a good idea to set folders to 777 online and expect to get away with it in the same way.

    So, I know that I’m not the first person to have this problem, but I would love to sort it out so that other users on Names servers can enjoy WordPress without the minor irritations of text but no pictures.

    Anyone got any ideas? And if I do need to set four-digit permissions, do I have to go to the command line or can I use something a little friendlier?

    Many thanks

    Peter Crosskey

    Ditto on the “I have the same problem,” but I do have a little more information on why 777 might not do it for some people. My server is configured to use File Access Control Lists. Apparently they are safer to use, and they supersede basic file permissions.

    My understand of this is hazy so if anyone knows more please enlighten me. But to change these access control lists look up the commands:

    getfacl
    setfacl

    Note: I think this is only on Unix based servers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Uploading media, directory not writable IIS issue’ is closed to new replies.