What's best way to secure a database connection string?

后端 未结 3 1926
南方客
南方客 2021-01-02 05:42

I am writing a set of database-driven applications in PHP. These applications will run on a Linux server as its own user. Other users will likely be on the system at times

3条回答
  •  盖世英雄少女心
    2021-01-02 06:21

    Here's a link to a free Apache module that helps to manage access to a password store:

    http://uranus.it.swin.edu.au/~jn/linux/php/passwords.htm

    It seems a little elaborate to me, and requires you run PHP under mod_php. And still it doesn't address the possibility that unauthorized people who have access to the server can just read your password file.

    I think you have to rely on file permissions, and trust that unauthorized people don't have the ability to sudo to your PHP application UID, or to root.

提交回复
热议问题