The MU forums have moved to WordPress.org

blogs.dir empty (8 posts)

  1. honsey
    Member
    Posted 16 years ago #

    hey,

    i recently installed wordpress.µ on my website and everythings seemed to work fine. i can setup blogs, users, install plugins – but one thing that isn't working are fileuploads.

    i searched the forum for a solution but my specific problem isn't described anywhere: my blogs.dir is completely empty

    when i try to upload something i get the following error:

    Unable to create directory /srv/www/vhosts/[…]/httpdocs/blogs/intern/wp-content/blogs.dir/1/files/. Is its parent directory writable by the server?
    (i replaced my host with […])

    i tried to chmod the directory to 775 and 777. that didn't worked, because its owner was wwwrun. so i deleted it via the plesq admininterface, given by my hoster and recreated it so that the standardftpuser owned it. then it was (of course) possible to chmod 775 or chmod 777 it but the problem persisted…

    my website runs on a virtual server, which is managable with plesq. safemode is turned on.

    hope you can help me. thanks in advance,
    hans

  2. andrea_r
    Moderator
    Posted 16 years ago #

    It stays empty until soemone uploads a picture, *then* it creates the needed directory.

    you have to get permissiosn & ownerships squared away. A quick fix is to create the first directory yourself and then when you get that working right, you shoudl be able to have the rest working.

  3. honsey
    Member
    Posted 16 years ago #

    thanks!

    thats what i did now … i created 10 folders, 1 to 10, including a files/ subfolder with the right permissions.

    it works now, but i'm a little bit afraid of hacking around in such a way…

    i ask myself: why isn't it working out of the box?

  4. andrea_r
    Moderator
    Posted 16 years ago #

    Because either the permission or ownership of the folders is incorrect on your web account. :)

  5. lunabyte
    Member
    Posted 16 years ago #

    Here's a bone for the permission-ly challenged:

    - SSH into your box.
    - cd to the wp-content dir.
    - Run the following commands, one after the other:

    chown nobody:nobody -R blogs.dir
    find blogs.dir -type f -print -exec chmod 644 {} \;
    find blogs.dir -type d -print -exec chmod 755 {} \;

    Please Note:Assuming that "nobody" is the user apache runs under. "nobody" is the standard apache config, including on stupid cpanel, and it most likely differs from your "user" account.

    For example, your user may be "mysite" and files are set with an ownership/group of "mysite", but the apache user is still "nobody".

    IF your apache user is something else, which could be "www", or "www-data" for example, then replace "nobody" with the correct apache user.

    Again, the actual apache user most likely is different than your account user, which owns your files by default.

    Notes:
    - If you don't know what ssh is, or have access to it, skip this whole post.

    - If you don't know for certain what the true apache user is, skip this post.

    - The above information comes with no guarantee, warranty, support, or responsibility. It is use at your own risk, and I'm not responsible for your use of it. ;)

    What this does:
    - Sets the owner and group as the main apache user for the blogs.dir and below it.

    - Sets the permissions for all files to 644 that are in the blogs.dir and below it.

    - Sets the permissions for all directories as 755 for the blogs.dir and all below it.

    Side effects:
    - For anything in the blogs.dir, you will not be able to upload through FTP to add or replace something. If you need to do that, first you must reset your owner/group to your user account, complete your tasks, then change the owner/group back to the apache user. (Using the chown line above, replacing owner/group as necessary.

  6. Anonymous
    Unregistered
    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

  7. jacco
    Member
    Posted 15 years ago #

    I hit on this empty blogs.dir problem. I followed advices here and the other tread http://mu.wordpress.org/forums/topic.php?id=5353 on doing the following:

    1. chowner from nobody to theuser, and chmod to 777 (more aggressive than doing a 755)
    2. manually added sub-folders /1/files/2008/11/ layer by layer

    On every subtle step in the above I tried uploading an image for a random post. The thick box window sent me back to the login page after about 30 seconds I pressed the upload button.

    I have a few other stand-alone wordpress sites running on the same server smoothly.

    The error log gives only this line repeatly on my uploading request:

    [23-Nov-2008 11:44:59] SYSTEM or PUBLIC, the URI is missing at line 1, column 61

    Anyone can suggest ways to fix?

  8. tdjcbe
    Member
    Posted 15 years ago #

    A quick looksee says that's a magpie RSS error. I'm leaning towards that as well since you may note that those hits are cross platform.

    Not sure if it's related to the blogs.dir issue.

About this Topic