Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to prevent database from listing/viewing?

by elwarren (Priest)
on Dec 03, 2004 at 15:59 UTC ( [id://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";

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-03-29 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found