Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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";

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
    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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://412162]
[choroba]: Hasn't someone forgot to tell the weather about it?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-03-21 08:11 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (265 votes). Check out past polls.