What is the safest way to achieve storing a config file into /etc after entering the settings on a php application running in Apache2 ?
I have a daemon reading its config at startup from a file I stored into /etc/mydaemon/main.conf (thought it was the best place to store its settings).
Now I want to have a php application allowing users to change its setup via elegant webpages. But how can I get the rights to write/overwrite this file without compromising the server's security?