[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Viewing a file inside a cgi-bin?



Hi:

I might also suggest that if you are going to execute a cgi script 
from within an HTML document on an Apache server you should try using 
an .shtml suffix instead of an .html. I found this out recently by 
attending this list.

Furthermore, considering folders, I believe that it is "best" to 
place an index.html within each folder that redirects the user back 
to the main index page. This keeps the files in your folders from 
prying eyes, or so I am told.

tedd

---
>--- Riccardo Perotti <perotti@pobox.com> wrote: > Hi
>all:
>
>I would not recommend placing the file where anyone
>can red or write to it. You are asking for trouble. =)
>
>If you are using an Apache server, try the following:
>
>Set your CGI-BIN to 'execute' only. Have the
>guestbook.cgi script save its data as a
>'write/execute' text file in a sub-directory of the
>CGI-BIN.
>
>Then use an SSI to include the text data in an HTML
>file, which can be placed anywhere.
>
>That way, the text data can be read by anyone, but
>only as part of an HTML page, and can only be written
>to via your guestbook.cgi.
>
>This stops anyone tampering with the text file.
>
>Hope that helps. I am sure someone can come up with a
>simpler solution though.
>
>ATB
>
>Richard
>
>>
>>  I have a newbie problem:
>>
>>  I wrote a guestbook script that writes to my
>  > "guestbook.htm" file. I put
>>  this file inside the cgi-bin so it could be written
>>  to, but now, obviously,
>>  nobody can view it and they get a 500 internal
>>  server error.
>>
>>  What is the right way to do this? Should I put the
>>  .htm file outside the
>>  cgi-bin and set  write permissions on it?
>>
>>  Thanks,
>>
>>  Riccardo Perotti
>>  --
>>  mailto:perotti@pobox.com
>>
>>
>>
>>  ==== Want to unsubscribe from this list?
>>  ==== Send mail with body "unsubscribe" to
>macperl-webcgi-request@macperl.org
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Shopping - Thousands of Stores. Millions of Products.
>http://shopping.yahoo.com/
>
>==== Want to unsubscribe from this list?
>==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org

-- 
http://sperling.com/
_______________________________________________________
Thinking about buying Jewelry?
Try our site: http://earthstones.com

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org