PDA

View Full Version : THTTP and Web Share - How to?



wrc4
27-05-2007, 16:11
I want to create a web share on my WL-HDD to host some feed, so that I can download files from a url like this:

http://192.168.0.61:8080/pdaxrom/beta3/feed/abiword_2.4.2_armv5tel.ipk

I installed THTTP-perl and created a symlink to the feed folder (stored on an ext3 partition) under /opt/share/www. But when I browse to the url above, I got this error:

403 Forbidden
The requested URL '/pdaxrom/beta3/feed/abiword_2.4.2_armv5tel.ipk' resolves to a file outside the permitted web server directory tree.
--------------------------------------------------------------------------------

thttpd/2.25b PHP/5.2.2

Here is my thttpd.conf file:

dir=/opt/share/www
port=8080
user=nobody
nochroot
nosymlink
novhost
cgipat=/cgi-bin/*
logfile=/opt/var/log/thttpd.log
# Please do not edit pidfile path at it is use to kill thttpd process during ini
pidfile=/opt/var/run/thttpd.pid

BTW, I got torrent.cgi in the cgi-bin folder and it's working fine.

wrc4
28-05-2007, 08:43
OK. I figured it out by myself.

First, the folder you want thttpd to expand on the web interface must have 777 (otherwise thttpd will let you enter that folder but won't show the files under it). The files under that folder must have at least 644(world readable), but should not have the execute bit on if you just want to host it as a data file.

Now I love my WL-HDD more!:)