Results 1 to 8 of 8

Thread: Apache on Feisty - Images "Forbidden"

  1. #1
    Join Date
    Jun 2007
    Location
    New Zealand
    Beans
    39
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Apache on Feisty - Images "Forbidden"

    Hi there, I am running a basic webserver on Feisty. The directory which my pages are in is /var/www. I have had no problem in the past, but recently I copyed a new website to the server from a flashdrive and placed it in that directory. I can view the html pages fine over the internet, but none of the images will show. If I try to open the images directly I get
    Code:
    Forbidden
    
    You don't have permission to access /images/beboButton.png on this server.
    Apache/2.2.3 (Ubuntu) PHP/5.2.1 Server at abominableginnypig.mine.nu Port 80
    I thought this would be basic file permissions, but I have other images in that folder with less permissions that show up!

    E.g. files that don't show up:
    Code:
    > ls -l
    total 32
    -rwxr-xr-x 1 www users  5402 2008-04-20 00:48 beboButton.png
    -rwxr-xr-x 1 www users  1488 2008-04-20 00:35 facebookButton.png
    -rwxr-xr-x 1 www users  7604 2008-04-20 00:35 myspaceButton.png
    -rwxr-xr-x 1 www users 10596 2008-04-20 01:12 youTubeButton.png
    files that do show up:
    Code:
    > ls -l
    total 1048
    -rw-r--r-- 1 www users 230796 2007-06-23 22:26 agbannerBlur.png
    -rw-r--r-- 1 www users 267611 2007-06-23 22:26 agbanner.png
    -rw-r--r-- 1 www users  52949 2007-09-17 22:00 arcade_thumb.jpg
    -rw-r--r-- 1 www users  67056 2007-06-23 23:34 GES.jpg
    -rw-r--r-- 1 www users 154427 2007-06-23 23:43 ML.jpg
    I'm sure this is something reallly basic and people ask this kind of stuff all the time, but I have been fiddling around for ages now and do not seem to be making any progress what so ever.

    Cheers,
    'stan.

  2. #2
    Join Date
    Nov 2005
    Location
    NEK Vermont
    Beans
    Hidden!
    Distro
    Ubuntu UNR

    Re: Apache on Feisty - Images "Forbidden"

    Take a look at your html and make sure the path to the pictures is correct. Check the owner of the pictures.

  3. #3
    Join Date
    Jun 2007
    Location
    New Zealand
    Beans
    39
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Apache on Feisty - Images "Forbidden"

    Thanks for your reply. I have checked the destinations to the pictures are correct, when I just try to open them in my browser I get two distinctly different errors, if I try to open "mysite/images/button.jpg" I get "FORBIDDEN"
    if I try to open "mysite/folderthatdoesntexist/button.jpg" I get "CANNOT BE FOUND".

    How do I check the owner of the pictures? from the above terminal output it says "users" for both files that show up and those that don't?

  4. #4
    Join Date
    Nov 2005
    Location
    NEK Vermont
    Beans
    Hidden!
    Distro
    Ubuntu UNR

    Re: Apache on Feisty - Images "Forbidden"

    I see now owner is the same. And you say the pictures you cannot access are in the same folder as the pictures you can access. Out of curiosity, has the server been restarted since adding the new pictures?

  5. #5
    Join Date
    Jun 2007
    Location
    New Zealand
    Beans
    39
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Apache on Feisty - Images "Forbidden"

    Hi, Since I am not at the physical location of the server I haven't been able to restart it. But I just restarted Apache and am still recieveing the same "403 Forbidden". I am very very confused as my file permissions are correct!!

  6. #6
    Join Date
    Sep 2007
    Beans
    268

    Re: Apache on Feisty - Images "Forbidden"

    Quote Originally Posted by AustinMarton View Post
    Hi, Since I am not at the physical location of the server I haven't been able to restart it. But I just restarted Apache and am still recieveing the same "403 Forbidden". I am very very confused as my file permissions are correct!!
    Dont you have SSH?

  7. #7
    Join Date
    Jun 2007
    Location
    New Zealand
    Beans
    39
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Apache on Feisty - Images "Forbidden"

    Wow! Well just to inform anyone who stumbles across here, these are the few simple commands that cleared up forbidden issues:

    Code:
    > mv images Images
    > mkdir images
    > cp ./Images/* ./images/
    > mv backgrounds Backgrounds
    > mkdir backgrounds
    > cp ./Backgrounds/* ./backgrounds/
    > rm -r ./Backgrounds
    > rm -r ./Images
    I still have no clue WHY a new folder with exactly the same permissions works and the old one doesn't, but it works.

  8. #8
    Join Date
    Apr 2006
    Location
    No Comment
    Beans
    1,733
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: Apache on Feisty - Images "Forbidden"

    next time try pressing F5 on your keyboard in the nautilus window, etc..
    My Stuff:
    Hostfile Blacklist
    K/Ubuntu 7.10 Tips/Tricks
    3_days_+_no_reply=Subscription_Removed

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •