[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: protecting MySQL password on multi-user system



Eric P wrote:
> I'm on a multi-user Linux system running PHP and MySQL.  I have user permissions only.  No root perms.
> 
> Whenever I do an SQL query, I include (via PHP) a file (of which I'm the owner) which exists just under the web root
> which contains my MySQL username and password.
> 
> I have to keep this file's permission at 644, or else I get 'permission denied' when my PHP script tries to include it.
>  Apache runs as 'noname' on this server, but I'm not able to chgrp or chown this file to 'noname'.  (Operation not
> permitted)  Again, I'm only one of many (thousands of?) users on this system, so I have to implement something with
> regular user perms only.
> 
> I definately don't want this file readable by 'other' (644).  Any ideas?
> 
> Thanks for reading!
> Eric
> 
> 

If your host is not setup keep your files completely isolated from other
users sharing the system, then find a new host.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: