Perobl has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks.
I'm building an online document management system using Perl & MySQL. I plan to store uploaded files to a directory on the server. All of the metadata about these files will be stored in a DB table (including the file paths pointing to the files). A Perl script governs the process. Target server is Apache.
I'd like to restrict access to the directory where the files will be stored. I'm guessing the best way to do this is via .htaccess. Please correct me if I'm wrong.
Assuming I set this up via .htaccess, how do I still permit my Perl script to allow users to upload files to the server? In other words, I'd like to permit the script to upload files at the user's request while simultaneously preventing unscrupulous users from accessing (viewing) the files directly simply by keying in the URL. The data is sensitive.
Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Restricting Access
by ikegami (Patriarch) on Aug 30, 2010 at 17:47 UTC | |
|
Re: Restricting Access
by JavaFan (Canon) on Aug 30, 2010 at 17:21 UTC | |
|
Re: Restricting Access
by aquarium (Curate) on Aug 30, 2010 at 23:26 UTC | |
|
Re: Restricting Access
by locked_user sundialsvc4 (Abbot) on Aug 30, 2010 at 21:48 UTC |