The MU forums have moved to WordPress.org

Uploaded images deleted (51 posts)

  1. selad
    Member
    Posted 17 years ago #

    I have uploaded (using the built in uploader) and about two or three days later they diapered from the server. It is not a hosting issue since this happens only with the main blog (id #1) and did happen more than once.

    Any idea?

  2. selad
    Member
    Posted 17 years ago #

    And this is on wpmu 1.0

  3. Lucifix
    Member
    Posted 17 years ago #

    Hi,

    same thing happened to me. Yestarday I was uploading images but this morning when I changed new theme almost every image that I have uploaded has disapear. No error no nothing...

    I'm using wpmu 1.0.

  4. quenting
    Member
    Posted 17 years ago #

    this never happenned to me but some of my users reported similar problems. I searched the source code for "unlink" and couldn't find any place where it would erase images when not expected to, so i thought probably they did some bad manipulation. Seeing this reported here makes me wonder again...

  5. pumpkinslayer
    Member
    Posted 17 years ago #

    Images have been deleted from both my main blog and other blogs. It happened on the main blog this week and on another blog about a week ago. Go to my blog and you will see the image links, but no images.

    All of the metadata is still intact. In other words all reference to it in the database still exists, but the image itself is not there.

    On looking into things I have noticed that all of the files that are created are created with 777 permissions, which means anyone can delete them, correct? Plus, it is within folders that are all 777 as well.

    This happened to me about a month ago and has now happened again within the last week.

    I was wondering if the permissions could be changed upon picture upload or whatever.

    Note that I am on shared hosting.

  6. johnsee
    Member
    Posted 17 years ago #

    I'm having the same problem.

    No way this is a hosting error.

    I'm on a dedicated box, and both times it has been the main blogs files that have gone missing only.

  7. pumpkinslayer
    Member
    Posted 17 years ago #

    I suspect the problem is as follows...

    Apache should be the owner of blogs.dir and everything below it. However I needed to reupload the dir and files for some reason and the owner and group became me. Apache could not create new directories without me changing directory permissions to 777. But, all files created were then 777 as well.

    This means it became pretty easy for nasty people to just remove files.

    Directories should be 755 and files 644.

    For the others having this problem are your directories and files set to 777?

    Bear with me through my ramblings...

  8. pumpkinslayer
    Member
    Posted 17 years ago #

    Can anyone confirm this being directly related to deletion of blogs as has been implied in other posts...

    I'll test it myself in a few hours time.

  9. johnsee
    Member
    Posted 17 years ago #

    Deletion of blogs?

    Only seems to be deletion of images that is the problem

  10. topherrosado
    Member
    Posted 17 years ago #

    Yes, it happens when you delete a blog. I've just deleted a blog, and now the images from the admin blog are gone.

  11. johnsee
    Member
    Posted 17 years ago #

    That makes sense. Because when I first reported his in November that's what I had just done! Except I assumed it was due to the fact I clicked the upgrade button.

    Argh! What a shitty error. I suppose we must have all been hit by spammer last night to have all been deleting blogs together today?

  12. johnsee
    Member
    Posted 17 years ago #

    Nope, I nor the other site admin did not delete any blogs when this happened this time. Although it *does* seem to be the cause of it happening last time.

  13. pumpkinslayer
    Member
    Posted 17 years ago #

    It could be related, but check if the images are missing before you delete those blogs. Perhaps those same spammers are trying to delete your files as well.

    The relation might not be your deleting them, but the fact that the spammers/hackers are targeting you at that time.

    EDIT: Whoa, those images that went from my main blog have reappeared, I'm lost for the moment.

  14. pumpkinslayer
    Member
    Posted 17 years ago #

    EDIT (again):Sorry, they really have disappeared, just the cache in my browser showing them.

  15. Ovidiu
    Member
    Posted 17 years ago #

    ok, I have the same problem:

    all of a sudden all images from a subblog, not the main blog disappeared. no trace of them, but they were still referenced corectly inside my posts.

    I just restored them from the daily backup.

    now, severall days later 2 other images have disappeared.

    I did not delete any blogs in the meantime...

    my righst are set as this:

    the wp-content folder is owned by me and the owning group is www-data which is the debian group for apache.
    also wp-content and all subcontent is set to 775 so that I and apache can fully control it...

    any ideas?

    P.S. I just remember haveing deleted some splogss from my mu install, it might have been before all images disappeared, but why have now disappeared some pictures again?

  16. quenting
    Member
    Posted 17 years ago #

    this seems like a major issue. I've had it personnaly reported to me that images disappeared long ago. I have stopped removing blogs from the admin interface since (i have my own removal scheme) and the problem wasn't reported anymore (which isn't either a proof it didn't happen or that the problem comes from this action).
    it's probably MU-related because if this was in WP this would have been spotted and corrected already. I did a search on the MU code and could only find the "unlink" function used in a couple of places, neither looked suspect, and neither could be called without the attachement records being removed from DB first. Is there any other way in php to delete a file than unlink ? The deleteblog function doesn't even remove the files on disk (probably that's the reason i made a custom one).

    If it comes from a more system origin, what could it be ? Even having file permissions a bit to high doesn't mean files will disappear... What kind of circumstances could cause this problem ?

  17. lunabyte
    Member
    Posted 17 years ago #

    I am wondering the same thing myself Q.

    Has anyone submitted this to trac so that Donncha is aware it's happening (for whatever reason)?

  18. andrea_r
    Moderator
    Posted 17 years ago #

    Nope, not in trac. I think we were all waiting for confirmation from others. It looks like it happend on my install too, so let's submit the trac now.

  19. lunabyte
    Member
    Posted 17 years ago #

    Well, I guess it's manually delete spammers for the moment then.

    I think I'm thankful right now that I stuck the time into putting the Flickr photo gallery and image insert bar into operation. Seems users have used that vice uploading.

  20. quenting
    Member
    Posted 17 years ago #

    manually deleting seems a better option anyway, since the files aren't removed otherwise.
    I'm reluctant with the flick plugin myself, less stickiness, I'm more looking into implementing a proper gallery. Means more disk space, but means more people interested by paying for more than those 50 megs ;-).

  21. Ovidiu
    Member
    Posted 17 years ago #

    did anyone test what happens if someone decides he doesn't like his blog anymore and self-deletes his blog via the dashboard and the option => delete blog menue?

  22. andrea_r
    Moderator
    Posted 17 years ago #

    It just gets "marked" for deletion, it's still there in the database. What you see on the admin side, is their blog all in red. What you see when you visit there blog is a white screen with "The user has elected to delete their blog."

    Every so often, I go through the blog list in the backend and delete all the red ones. :) This just deletes blogs, not users.

  23. Ovidiu
    Member
    Posted 17 years ago #

    thats almost what I did. found splogs, marked them as spam, waited for 2 weeks to see if the blog owner contacted me and as nothing happened I deleted them from my admin interface.
    then uploaded files disappeared.

    ...
    thx for clarifying and explaining

  24. quenting
    Member
    Posted 17 years ago #

    I got another blog complaining about images deleted. I've checked what's done on the "mark as spam" admin action, and wouldn't find anything.
    The entries corresponding to the images have been removed from the DB, so this has to be a WPMU thing. Have they been removed too when you guys see this happenning ?

  25. Ovidiu
    Member
    Posted 17 years ago #

    what exactly do you mean by:

    The entries corresponding to the images

    if I got you right, here is my answer: all posts had the references to the images still there, just pointing nowhere as the pictures had disappeared...

  26. quenting
    Member
    Posted 17 years ago #

    I mean that in wp_xxx_postmeta I have rows for the remaining images, but the ones that got deleted don't have their rows in the table anymore (meaning probably MU removed them).

  27. quenting
    Member
    Posted 17 years ago #

    I got some explanations from a user who had some of her images removed. Apparently she was online and editing when she realized her images disappeared.

    [quote]
    I was on my blog uploading a picture and when I inserted it in my page the others previously inserted disappeared in the text editing zone and got replaced with blue rectangles with the file name.
    [/quote]

    Seems to me it would be quite a coincidence that another manipulation removed the images and the user was just at this time writing in the blog.
    *goes investigate file upload functions*

  28. quenting
    Member
    Posted 17 years ago #

    another of my users got a lot of her files removed. There are no corresponding entries in wp_posts for the removed files, so I'm almost 100% positive this is an MU problem, not a hosting issue.

  29. dizzy99
    Member
    Posted 17 years ago #

    I can confirm that on testing a delete of a blog, all blog ID 1 images are deleted also. What a wonderful bug :(

  30. arma
    Member
    Posted 17 years ago #

    The problem exists in the admin-db.php file. The var $dir = constant( "ABSPATH" ) . constant( "UPLOADS" ); sets the wrong directory for deletion. A temporary fix is to comment out that line and add the line $dir = constant( "ABSPATH" ) . "wp-content/blogs.dir/" . $blog_id ."/files/"; But this should only be temporary until a final fix is made.

About this Topic