Old 09-08-2004, 08:32   #1 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 913
simple file list

ok, this is something which i should really know how to do but i don't

i have a directory on my server with a big bunch of images in. the permissions on the folder are set to READ on every option and all i want is for somebody to be able to type the directory list and be presented with the list of the files in that directory. i.e the names of all the images.

when i do it though, it just says FORBIDDEN!!!!!!

arse
__________________
::: TC Magazine :::
  Reply With Quote
Old 09-08-2004, 08:35   #2 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,186
what type of server?
  Reply With Quote
Old 09-08-2004, 08:37   #3 (permalink)
Jay-NL
Not A Designer
 
Jay-NL's Avatar
 
Join Date: Jul 2004
Location: tHe NeTHerLaNDs
Posts: 122
Set the "execute" flag as well. For directories it works as a "browse" attribute. Without it, the browser is not allowed to get a directory listing.
Hope that works.
__________________
-= In theory, theory should work in practice. =-
  Reply With Quote
Old 09-08-2004, 09:05   #4 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 913
just checked it out and the EXECUTE setting is on for all different user groups. The only setting I haven't ticked for all groups is "WRITE"

here's the link so you can see the nice and friendly forbidden notice...

http://www.thunderchunky.co.uk/badges
__________________
::: TC Magazine :::
  Reply With Quote
Old 09-08-2004, 09:08   #5 (permalink)
oli
I Call Shenanigans™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester, England.
Posts: 9,893
  Reply With Quote
Old 09-08-2004, 09:17   #6 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 913
too advanced already. i still have a shitty host with no php. time to move me thinks
__________________
::: TC Magazine :::
  Reply With Quote
Old 09-08-2004, 13:35   #7 (permalink)
Jay-NL
Not A Designer
 
Jay-NL's Avatar
 
Join Date: Jul 2004
Location: tHe NeTHerLaNDs
Posts: 122
I see the server is Apache/UNIX.
If you just want a list of file links, create an executable .cgi file with the following lines:

Code:
#!/bin/sh echo Content-type: text/html echo echo '<HTML><HEAD><TITLE>File List</TITLE></HEAD><BODY>' echo '<P>File list:</P> <P>' for i in *; do echo '<A HREF="'$i'">'$i'</A><BR>' done; echo '</P></BODY></HTML>'

Modify the HTML any way you like.
It should work, tell me if it doesn't.
__________________
-= In theory, theory should work in practice. =-

Last edited by Jay-NL : 09-08-2004 at 13:58.
  Reply With Quote
Old 09-08-2004, 13:55   #8 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,186
seeing as its an apache server, why not use the options index directive within the htaccess file - surely the easiest way:

http://httpd.apache.org/docs/mod/core.html#options

that's if you have access to the htaccess. if you don't, then start paying properly for your hosting - it'll open many new features that you will use.
  Reply With Quote
Old 09-08-2004, 14:15   #9 (permalink)
Jay-NL
Not A Designer
 
Jay-NL's Avatar
 
Join Date: Jul 2004
Location: tHe NeTHerLaNDs
Posts: 122
Or you could combine htaccess and a cgi script. That way you can have a fancy HTML dir listing page, in your style, that loads when the user types only the dir name.
__________________
-= In theory, theory should work in practice. =-
  Reply With Quote
Old 10-08-2004, 04:19   #10 (permalink)
JiRaffe
Ur mother's ur brother?
 
JiRaffe's Avatar
 
Join Date: Jun 2003
Location: Liverpool
Posts: 913
cheers for the advice guys. to be honest, i really didn't think it would be anything remotely complicated. I thought it would show the file list be default if there wasn't an index file there. I'll check out those things but worst comes to the worst i'll just type up a list of the links
__________________
::: TC Magazine :::
  Reply With Quote
Old 10-08-2004, 04:23   #11 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,186
it will, if you are allowed to make changes to your htaccess file. have a look for it on your server via ftp. then add this:

Code:
<Directory /web/docs> Options Indexes FollowSymLinks </Directory>

although you have to change this [/web/docs>] to your default directory.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8