Page 1 of 1

Need some webpage help

Posted: 2004-02-14 02:03am
by Shadowhawk
I pretty much use my webspace on Comcast just to store images.
Comcast, in their infinite wisdom of deciding what's best for their users, have set up the server so that if there is no index.html file (or whatever equivilents they have in their list), it displays a 'User has not moved in' page. No plain ol' directory listings are allowed.
This is a pain in my ass, since I've got to log in via FTP to remind myself what files I have there. Making a new index.html file for every time I add files is an even bigger pain.
So, I want a work around. I'd like some piece of code I can drop into a generic index.html file that'll list every file in the directory, just like a normal listing. Comcast's support forums were worthless except for informing me that my scripting options are quite limited (more of that wonderful Comcast service package).

So, anyone have some code, ideas, tips, or a good place I can go to find such code?

Posted: 2004-02-14 02:55pm
by Mad
Can you display file listings on subdirectories?

Posted: 2004-02-14 03:54pm
by Shadowhawk
Mad wrote:Can you display file listings on subdirectories?
Nope. It puts that 'not moved in' page for every subdir you create.

Posted: 2004-02-15 03:20am
by Vertigo1
I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.

Posted: 2004-02-15 07:40am
by Dalton
They're an ISP.

Posted: 2004-02-15 11:53am
by phongn
Vertigo1 wrote:I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
Actually, there are security reasons for this, so many webhosts do not let you get directory access.

Posted: 2004-02-15 04:55pm
by Shadowhawk
phongn wrote:
Vertigo1 wrote:I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
Actually, there are security reasons for this, so many webhosts do not let you get directory access.
Yes, and that's presumably why they did it. Really annoying that they didn't make it a user-configurable option, though.

Posted: 2004-02-15 05:52pm
by Mad
So what kind of scripting options do you have? You can't use straight HTML to give you a file listing. (You'd have to update it manually as you suggested... if you only add or removes files every now and then it shouldn't be too difficult to do that.)

Posted: 2004-02-16 12:18am
by Pu-239
Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.

Posted: 2004-02-16 12:36am
by Pu-239
Or you can get someone to convert this script to windows bash and run it in a copy of your FTP directory on your hard drive before updating:

Code: Select all

#!/bin/bash
ls|sed -e 's/^\(.*\)/<a href="\1">\1<\/a><br>/g'>/tmp/list
echo '<html>
<head>
<title>List of files</title>
</head>
<body>'>/tmp/head
echo '</body>
</html>'>/tmp/tail
cat /tmp/head /tmp/list /tmp/tail>list.html
rm /tmp/list
rm /tmp/head
rm /tmp/tail
I love *nix and sed (v4).

Posted: 2004-02-16 04:58am
by Shadowhawk
Mad wrote:So what kind of scripting options do you have? You can't use straight HTML to give you a file listing. (You'd have to update it manually as you suggested... if you only add or removes files every now and then it shouldn't be too difficult to do that.)
Not really sure what sort of scripting I'm limited to. Pretty sure that CGI is an option. If java/javascript needs any server-side stuff (I'm quite ignorant on it), I'd imagine that's not allowed, either.
Pu-239 wrote:Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.
Yeah, looks like they have. Won't allow any file that starts with a .

Posted: 2004-02-16 05:00am
by Comosicus
If you are allowed PHP it's not so difficult.