Results 1 to 5 of 5

Thread: Own hosted website images not showing.

  1. #1
    Join Date
    Jul 2011
    Location
    South-Africa
    Beans
    678
    Distro
    Ubuntu 12.04 Precise Pangolin

    Own hosted website images not showing.

    Hay all,

    I am puzzled by this. I have created a very basic website, with a few images on the main page.
    However loading the webpage from a browser on a remote server, the images simply do not load. Localy the site works perfectly.

    All images are located in the "./images" folder:

    Code:
    .
    ├── construction.html
    ├── contact.html
    ├── images
    │   ├── bak
    │   │   ├── pic1.jpg.bak
    │   │   ├── pic2.jpg.bak
    │   │   ├── pic3.jpg.bak
    │   │   └── pic4.jpg.bak
    │   ├── img01.gif
    │   ├── img02.gif
    │   ├── pic1.jpg
    │   ├── pic2.jpg
    │   ├── pic3.jpg
    │   └── pic4.jpg
    ├── index.html
    ├── Site.zip
    └── style.css
    The graphics are loaded in the two following manners. (the full adress way is only for debugging purposes.)
    Code:
    <div id="splash"> <img src="http://www.invisibleforceproductions.co.za/images/pic1.jpg" alt="" height="295"
              width="1180"> </div
    Code:
    <li class="first"> <img class="alignleft"
                      src="images/pic2.jpg" alt="" height="60" width="60"> <span>We
    
                      base all business we do on:</span></li>
    Neither the full, nor the relative path produces the graphics.
    The folder permissions are 0644
    The file permissions are 0644
    This is true for all the graphics and main files. I do not understand what might be the cause of this.

    Please advise.
    Last edited by zero2xiii; April 1st, 2013 at 10:42 PM.
    Switched away from windows XP to Ubuntu 9.04. Never turned around to look back.

  2. #2
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Own hosted website images not showing.

    All the images on the site seem to be working fine for me, so I assume you have already fixed the problem?

  3. #3
    Join Date
    Jul 2011
    Location
    South-Africa
    Beans
    678
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Own hosted website images not showing.

    Hay,

    Some what. I dropped all the images in the root folder, and changed the paths to look only in the current directory.

    I will upload a "test" page that will be coded as it is suppose to work.

    The test page can be found here:
    www.invisibleforceproductions.co.za/test.html

    Cheers

    EDIT:
    Seems like I found the problem. Seemingly the "execute" permission should also be set for the images to load.
    Changing the folder permissions to 0755 allowed the pictures to be loaded. Is this correct, and secure? I thought read permissions are the only ones needed?
    Also now the entire ./images/ directory can be listed, which I definitely do not want...

    EDIT 2:
    Seems like I have solved the issue. Had to turn off the public indexing. Still not sure why the executable flag allows the images to load. But it is working now. Marking the thread as solved... Need to sharpen my apache knowledge it seems... Along with it's file permissions....
    Last edited by zero2xiii; April 1st, 2013 at 10:41 PM. Reason: Kinda got it to work...
    Switched away from windows XP to Ubuntu 9.04. Never turned around to look back.

  4. #4
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Own hosted website images not showing.

    oh, that's a good point, you need to have execute permission on directories to be able to access their contents. You shouldn't need execute permission on the images though.

    (permissions on directories are slightly different from the ones used on files, the "execute" is often called "search permission" as it's required to access the inode information of files and subdirectories. For example read permission allows you to list a directory's contents, but to cd into it or access the files using many tools you also need the execute bit to be set. And it also needs to be set for all the parent directories as well...)

  5. #5
    Join Date
    Jul 2011
    Location
    South-Africa
    Beans
    678
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Own hosted website images not showing.

    Oh I see,

    Well now I have it working. Many thanks

    Philip
    Switched away from windows XP to Ubuntu 9.04. Never turned around to look back.

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
  •