Moodle

File not found message when using file browser (file.php) to access files in "moddata" subdirectory directory

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.9.5
  • Fix Version/s: None
  • Component/s: Files API
  • Labels:
    None
  • Environment:
    SuSe Linus 11.1, Moodle 1.9.4 (20090422), php 5.2.9, MySQL 5.0.67, Browser IE7
  • Database:
    MySQL
  • URL:
    http://staffnet.sceggs.nsw.edu.au e-mail me I'll give you a temporary login so you can see the problem yourself.
  • Affected Branches:
    MOODLE_19_STABLE

Description

Using the module Slideshow. In the process of doing it's thing it moves thumbnail images to a directory it creates called moddata. When displaying the slideshow the large images display fine (ther are displayed from the orginal directory to which they are uploaded, the thumbnail images do not display.

I investigated further and I see that browsing the files/moddata directory using the file browser I can see the files in the moddata sub directories, but when I click on one of them I get a 404.

Here are the permissions for the various directories for course 17:

drwxrwsr-x 2 wwwrun staffmoodle 4096 Nov 16 2007 Agenda
drwxrwsr-x 2 wwwrun staffmoodle 4096 Dec 3 2007 Graphics_and_images
drwxrwsr-x 2 wwwrun staffmoodle 4096 Jun 16 07:55 Images_for_slideshow
drwxrwsr-x 2 wwwrun staffmoodle 4096 Nov 27 2007 Minutes
drwxrwsr-x 2 wwwrun staffmoodle 4096 Jun 16 08:14 Small_images
drwxrwsr-x 2 wwwrun staffmoodle 4096 Jun 16 09:12 Word
drwxrwsr-x 2 wwwrun staffmoodle 4096 Jun 15 23:00 backupdata
drwxrwsr-x 2 wwwrun staffmoodle 4096 Dec 3 2007 file_management
drwxrwsr-x 3 wwwrun staffmoodle 4096 Jun 16 09:12 moddata

Now I drill down into moddata:

drwxrwsr-x 4 wwwrun staffmoodle 4096 Jun 16 08:15 jpgs_data

Then further down into jpgs_data
drwxrwsr-x 3 wwwrun staffmoodle 4096 Jun 16 08:02 Images_for_slideshow
drwxrwsr-x 2 wwwrun staffmoodle 4096 Jun 16 08:15 Small_images

and then finally down into small images:

rw-rw-rw 1 wwwrun staffmoodle 1390 Jun 16 08:15 rivers.jpg
rw-rw-rw 1 wwwrun staffmoodle 1910 Jun 16 08:15 roads.jpg
rw-rw-rw 1 wwwrun staffmoodle 1967 Jun 16 08:15 shipping.jpg
rw-rw-rw 1 wwwrun staffmoodle 1521 Jun 16 08:15 trains.jpg
rw-rw-rw 1 wwwrun staffmoodle 1904 Jun 16 08:15 trees.jpg

Lets say I atempt to open trees.jpg using the file browser I get this in the apache2 access_log

staffnet.sceggs.nsw.edu.au 172.17.25.18 - - [16/Jun/2009:09:51:21 +1000] "GET /file.php/17/moddata/jpgs_data/Images_for_slideshow/trees.jpg HTTP/1.1" 404 7079 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)"

I now move trees.jpg to another directory in that same course, say minutes.....then I get

staffnet.sceggs.nsw.edu.au 172.17.25.18 - - [16/Jun/2009:09:53:09 +1000] "GET /file.php/17/Minutes/trees.jpg HTTP/1.1" 200 2228 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)"

Can anyone help me?

Activity

Hide
James Barrett added a comment -

This is now fixed in the latest version (http://virtual.cornwall.ac.uk/downloads/slideshow.zip). The problem was the new security feature that stricter checking of URLs in ./moddata/ folders.

Show
James Barrett added a comment - This is now fixed in the latest version (http://virtual.cornwall.ac.uk/downloads/slideshow.zip). The problem was the new security feature that stricter checking of URLs in ./moddata/ folders.
Hide
Petr Škoda (skodak) added a comment -

ah, right - moddata directory has strictly defined structure, sorry for the trouble.

Show
Petr Škoda (skodak) added a comment - ah, right - moddata directory has strictly defined structure, sorry for the trouble.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: