The MU forums have moved to WordPress.org

WP MU tries accessing root on shared server, so can't upload images (4 posts)

  1. mcnam007
    Member
    Posted 15 years ago #

    When I try upload an image (via Media/Add New), I get an error message:

    "Unable to create directory /var/www/vhosts/managementhelp.org/httpdocs/blogs/wp-content/blogs.dir/5/files. Is its parent directory writable by the server?"

    So WP MU wants write permission to the root of my web host company's shared server (which has many other customers on it). The company understandably doesn't want to give me that permission because that would permit me to access the files of the company's other customers.

    How can I reconfigure WP MU to only access files in my account, without trying to access the root directory of the server?

    Thanks in advance!

  2. SteveAtty
    Member
    Posted 15 years ago #

    No - its suggesting that either 5 or blogs.dir is not writrable. Check the permissions on both of them. If there isn't a 5 directory then that would point to blogs.dir not being writeable.

  3. mcnam007
    Member
    Posted 15 years ago #

    SteveAtty,
    THANK YOU!

    You got me past the first error message -- I changed the protections on the directories and it worked.

    Now I get the error message:
    "The uploaded file could not be moved to the upload folder."

    I've researched that error and found that it's quite frequent in WP MU. People have tried changing ownerships and groups (esp. Apache), and it doesn't reliably fix the problem.

    The permanent fix seems to be: in wp-load.php, change the command
    define( ‘ABSPATH’, dirname(__FILE__) . ‘/’ );
    to:
    define ‘/users/mylocation/sites/www.mydomain.com/’);

    (But then each time there's an upgrade, the fix has to be done again.)

    Thanks again!

  4. jazzstudios
    Member
    Posted 15 years ago #

    I've been pulling my hair out for days about this issue.

    All of the parent directories above and including blogs.dir are writeable, it's creating subdirectories 1,2, and 3 for my blogs, which are also writeable, but it will not post the file I am trying to upload. I still get the same error macnam007 posted above.

    When I turned off the option to create month/year subdirectories, it started to work, but only with my main blog (1); it still doesn't work with my subdirectory blogs (2 and 3). I have changed those blogs to also not use month/year subdirectories, but it appears to still be trying. Am I missing a setting somewhere?

    I've tried changing the ABSPATH in wp-load.php but all that does is duplicate the path so obviously the path is fine.

    Help please! hehe

About this Topic

  • Started 15 years ago by mcnam007
  • Latest reply from jazzstudios