The MU forums have moved to

cant create directory for upload (17 posts)

  1. blogsayfasi
    Posted 17 years ago #


    I searched but I cant find any information about this problem.

    wp-content chmod => 777
    blogs.dir chmod => 777
    safe mod => on

    problem is ;
    when I try to upload a picture , its create /1/ directory but cant create /files/ directory and cant upload picture...

    I look at the ftp and see wp-content/blogs.dir/1/

    and other users ids /2/ , /3/ etc.. but no / files / directories in ...

    I did try to make chmod on root , on ftp and on plesk panel.. but still there is same problem..

    do you have any idea for this ?


  2. lunabyte
    Posted 17 years ago #

    safe mode => on

    Safe mode sucks, and I'd bet that's part of the problem.

  3. blogsayfasi
    Posted 17 years ago #

    safe mod needs be ON for securty.there is no more method to work upload ?
    anothers web pages also has safe mod on but they can upload pictures ..

    thank you

  4. lunabyte
    Posted 17 years ago #

    Really? It does?

    Or you choose for it to be on?

    I hate safe mode. Causes far more problems than it's worth. There's a reason php has it turned off by default in php.ini.

  5. blogsayfasi
    Posted 17 years ago #

    I use shared hosting .

    shared hostings prefer to make safe mod on for security.if make it off ,then some shell php files can work on server ..

    any idea ?

  6. drmike
    Posted 17 years ago #

    Check the ownership of the blogs.dir subdirectory. Should be {your username on that box}:{the username that the webserver runs under} Check the '1' subdirectory as well just for reference.

    Safe mode's off here.

  7. lunabyte
    Posted 17 years ago #

    Wow, your host really fed you a line, huh? Sorry to hear it.

  8. drmike
    Posted 17 years ago #

    I doubt it. I can see why folks would want to have safe mode on.

    It's off on my shared hosting boxes, my large *cough* adult client has it turned on but he manages his own boxes.

  9. blogsayfasi
    Posted 17 years ago #

    Hi drmike,
    I loked usernames of folders.

    /blogs.dir/ folder's username is "blogsayfasi"
    /1/ subfolder's username is "apache" .
    usernames diffirent and safe mode on. than cant creat /files/ directory...:(
    we have 2 mu site and same problems...

    what can I do for this ? how to change username apache to blogsayfasi on subfolders ?

    maybe I need change somethings at mu. example give up /1/ subdirectory and /files/ directory. pictures can be upload blogs.dir then. ( I think ). I need try this. but if filenames is same?...

    I will say results here.

  10. blogsayfasi
    Posted 17 years ago #

    I changed folder /wp-content/blogs.dir/user/files/ to
    Just I opened files directory on root. and edited wp-settings.php .
    okay its working. Pictures uploaded but if a user upload a picture with same filename its rewrite on...

    How can I change file names when uploaded ?
    example : if I upload image.jpg to files.
    then make its name userid-image.jpg
    how can I do this on htaccess ?
    can you help me please.
    Thank you

  11. lunabyte
    Posted 17 years ago #

    "safe mode on"

    Biggest part of the problem right there.

  12. blogsayfasi
    Posted 17 years ago #

    :) wordpress mu is changing file name if already there is with same name ... so there is no problem for me ..
    other people try my this method.
    if safe mod is on,
    1- open wp-settings.php and change folder .example;
    do it just

    all pictures will upload in this folder without subfolders...
    I use this method and working good.

    good days

  13. lunabyte
    Posted 17 years ago #

    And what happens when other blogs also upload images, to the same dir?

    Not to mention the other stuff it's going to break, like space allowed/used, etc.

    And all images will be manageable by ANY user.

    Bad, idea. Bad, bad idea. Provided you explained it correctly.

    The way I'm reading it, is that ALL uploads will go to wp-content/blogs.dir/, without any user separation. If that's the case, it would be unacceptable in a multi-user environment.

  14. blogsayfasi
    Posted 17 years ago #


    not bad idea still. because a user manage pictures which he/she uploaded ...I cant see other users' uploads..I tried this with a few users.

    You can try too.

  15. zohar
    Posted 17 years ago #

    I had the same problem. Turning the Safe Mode off fixed it.

  16. anjovis
    Posted 16 years ago #

    turning safe_mode off is not a fix, it's a crappy workaround.

    I worked around this issue by changing the file upload path in wp-settings.php, I removed the "/files/" -bit from UPLOADS definition. This way all blogs still have their own upload directories.

  17. Anonymous
    Posted 15 years ago #

    This worked for me, using a Plesk environment:

    Make sure the web server user (apache in my case) is a member of the group owner of the blogs.dir folder (psacln in my case.) Doing this enabled me to keep the blogs.dir and subfolders 775.

    usermod -G psacln apache

About this Topic

  • Started 17 years ago by blogsayfasi
  • Latest reply from Paul B.