silent11 has asked for the wisdom of the Perl Monks concerning the following question:
I use the below module as a layer of security between my database accessing perl scripts and potential trouble makers. I'm sure there are better ways to implement this, however this is what I use.
My question is regarding the directory and file permissions of the module and the directory containing the module. What settings would be the most secure. This will be hosted on a shared UNIX hosting provider. Currently both file and directory are set at 755.
Thanks.
If there are safer means of accomplishing this ( removing user and pass info out of the script ) please mention them.
-silent11
My question is regarding the directory and file permissions of the module and the directory containing the module. What settings would be the most secure. This will be hosted on a shared UNIX hosting provider. Currently both file and directory are set at 755.
Thanks.
package DB; use strict; use DBI; sub connect { my $db_name = "xxx"; my $host_name = "xxx"; my $user_name = "xxxxxx"; my $password = "xxxx"; my $dsn = "DBI:mysql:host=$host_name;database=$db_name"; return (DBI->connect ($dsn, $user_name, $password, { PrintError => 0, RaiseError => 1})); } 1;
If there are safer means of accomplishing this ( removing user and pass info out of the script ) please mention them.
-silent11
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: directory and file access for modules containing sensitive information
by idsfa (Vicar) on Jul 28, 2004 at 16:07 UTC | |
Re: directory and file access for modules containing sensitive information
by bigmacbear (Monk) on Jul 28, 2004 at 15:49 UTC |
Back to
Seekers of Perl Wisdom