404 from WordPress when browsing image in unmanaged directory (3 posts)

  1. cosmictap
    Posted 9 years ago #

    Hi everyone,

    I do not use the upload function very much in my WP install - but do share/display images occasionally in my postings. I have a new strange occurrence going on. What I tend to do if I want to share an image in a posting is FTP the image up to a directory (say, "images") then either hyperlink to the image or insert it into the posting.

    Lately something odd is going on. I upload an image to my images file (using FTP), then if I insert it into the posting, the "alt" text is displayed, but no image. If I try to *browse* the image on my own, using its direct URL (e.g. opening http://www.cosmictap.com/images/randomimage.jpg in a browser), I get a 404 response from WordPress, like this:

    404 - Not Found

    Sorry, no posts matched your criteria.

    I *know* the file is there. I *know* the permissions on the file and the images dir are 644. (Although I've tried setting them to 777 to no avail) .. I *know* the URL is correct. The htaccess has nothing funky (i don't think) - just this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    It has oddly seemed to be very sporadic and sometimes apparently "self-healing" - e.g. the images will eventually start showing up, and sometimes revert back to a 404.

    I called it an "unmanaged" directory because basically WordPress doesn't even know that directory exists - it's independent of my WP install, so I don't get why it's butting its virtual nose in....

    I'm stumped, my searches on W.org have come up with nothing spot-on, and I'm turning to all of you.


    I have no clue what's happening.

  2. cosmictap
    Posted 9 years ago #

    Hmm, I just did a chmod 755 for the folder AND the files, and it seems to be working fine now. Odd - it may flake out again, but I offer this post to those who might stumble across this later....

  3. whooami
    Posted 9 years ago #

    I *know* the permissions on the file and the --->images dir <--- are 644.

    (arrows are mine)

    Your answer was in your first post, since a directory needs to be 755 to be world readable.

    The files are fine at 644.

Topic Closed

This topic has been closed to new replies.

About this Topic