List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 13 1999 8:57pm
Subject:Re: .my.cnf, security, and permissions
View as plain text  
>"Peter F. Brown" wrote:
>>
>> Hi Folks,
>>
>>    Besides changing Apache to run as a user (thanks Benjamin), does
>> anyone have any thoughts about getting web Perl script to read
>> .my.cnf when .my.cnf is set to 600? (The Perl script runs as nobody,
>> so it can't read it unless .my.cnf is set to 644.)
>>
>>    Is this a limitation of Unix that we can't avoid, or is there
>> some brilliant work around?
>>
>> Yours,
>>
>> Peter
>>
>
>Why would Apache ever need to read .my.cnf ?

So that you don't have to put the user name and password directly in the
script.  You never know when a sysadmin will misconfigure the server and
start sending out .cgi files as plain text. :-)

Besides that, you can think of putting option file parameters in a file
as being like calling a subroutine.  You put the parameters there, then
you only have to make a single change to affect all the scripts that use
the file, rather than changing a bunch of individual scripts.  I guess
this is also something like the PHP include() mechanism.

-- 
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
.my.cnf, security, and permissionsPeter F. Brown11 Jul
  • Re: .my.cnf, security, and permissionsBenjamin Pflugmann11 Jul
    • Re: .my.cnf, security, and permissionsPeter F. Brown13 Jul
  • Re: .my.cnf, security, and permissionsSasha Pachev14 Jul
    • Re: .my.cnf, security, and permissionsPaul DuBois14 Jul
  • Re: .my.cnf, security, and permissionsRonald Beck14 Jul
    • Re: .my.cnf, security, and permissionsPeter F. Brown14 Jul
      • Re: .my.cnf, security, and permissionsPaul DuBois14 Jul
Re: .my.cnf, security, and permissionsPeter F. Brown14 Jul