Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to prevent database from listing/viewing?

by elwarren (Curate)
on Dec 03, 2004 at 15:59 UTC ( #412162=note: print w/ replies, xml ) Need Help??


in reply to How to prevent database from listing/viewing?

This is a file permissions issue with your webserver, really not much you could do with the code. You will need to either move to file to another directory and update the script to load this new file location. You could restrict privs on the file so that only the webserver process can read the file, but all your web requests will come in with this same user anyway. If you don't have any control over your server(which is how it sounds) then this won't work either.

The only change required to move this file would be updating this line to point to a different dir:

my $CSV_file = "database.txt"; like this my $CSV_file = "hidden/dir/database.txt";


Comment on Re: How to prevent database from listing/viewing?
Download Code
Re^2: How to prevent database from listing/viewing?
by santander (Acolyte) on Dec 03, 2004 at 16:45 UTC
    Yes, this is webserver issue. I undersnad now, just change this path. Or another way, may be, rename database to something.txt (it's hidden in the script no nobody can find it)or change extension, like database.pl
    Will this work also?
      I hadn't thought about renaming the file, but that could work. My webserver is configured to not serve files that are named beginning with a dot. This is to prevent the .htaccess .htpasswd .listing maintenence type files from being served to the world. Again, this all depends on your server setup, but you could try renaming the file to .database or something.

      HTH

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://412162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-12-21 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls