The MU forums have moved to WordPress.org

Image Upload - Permissions Question (16 posts)

  1. bschwarting
    Member
    Posted 15 years ago #

    I'm now on VPS, setting up version 1.3. When I try to upload an image in a post, i get this error. I've tried changing all of them to 777 with no luck, so i started searching and saw some stuff about ownership. Who should own what directory? In my setup, by default everything is owned by root except blogs.dir which is owned by apache.

    Does that sound correct?

    Unable to create directory /var/www/vhosts/default/htdocs/wp-content/blogs.dir/4/files/. Is its parent directory writable by the server?

  2. MrBrian
    Member
    Posted 15 years ago #

    Type 'chown root.root -R /var/www/vhosts/default/htdocs/wp-content/blogs.dir' and double make sure it's 777.

  3. bschwarting
    Member
    Posted 15 years ago #

    it's 777, triple double checked :)

  4. andrea_r
    Moderator
    Posted 15 years ago #

    Is there a user/group for the web account?

  5. bschwarting
    Member
    Posted 15 years ago #

    by web account, do you mean apache?

  6. andrea_r
    Moderator
    Posted 15 years ago #

    Nope. I mean the user/group attached to the account for the main domain.

  7. MrBrian
    Member
    Posted 15 years ago #

    Try deleting blogs.dir with your FTP program and then re-create it and chmod again. Or maybe shared hosting is for you.

  8. andrea_r
    Moderator
    Posted 15 years ago #

    MrBrain - he just moved *off* shared. :D

    It's okay, b. It's a steep learning curve, but you'll get it.

  9. bschwarting
    Member
    Posted 15 years ago #

    Shared hosting is for me? Not sure i get that.

    I tried to upload the 1st time, WP creates blogs.dir with no sub-directories. If I manually create the 2nd and 3rd level directories, it uploads fine. Not sure I understand what could be causing this. If WP can create blogs.dir, why can't it create sub-directories?

    The main domain account is root.

  10. andrea_r
    Moderator
    Posted 15 years ago #

    Have you tried letting root own blogs.dir?

  11. lunabyte
    Member
    Posted 15 years ago #

    Why let root own it? How about the user apache is running as?

  12. andrea_r
    Moderator
    Posted 15 years ago #

    "the user apache is running as"

    There, that's what I meant. :D

  13. bschwarting
    Member
    Posted 15 years ago #

    thanks all, got this fixed. my bro-in-law was in town this weekend and he helped me out. he's a sr. unix admin at oracle. the permissions ended up getting "half changed" in the directories. (ssh crash) half were on root, half were on apache so it got confused. changed them all to apache and WPMU is finally happy!

    thanks again!

  14. Anonymous
    Unregistered
    Posted 14 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

  15. petti
    Member
    Posted 14 years ago #

    If using cpanel server , you should delete or rename the blogs.dir folder to something else ( for ex : blogs.dir2 ! )
    then create new folder manually ( blogs.dir )and set 777 permissions .

    Then problem will be fix automatically :) .

  16. tdjcbe
    Member
    Posted 14 years ago #

    Um, no. That's a security risk and leaves you open to problems.

    The blogs.dir subdirectory is created by the webserver during install and should be left alone.

About this Topic

  • Started 15 years ago by bschwarting
  • Latest reply from tdjcbe