I want to enable apache to automatically create files/directories.
In some web hosts, for example, when I install wordpress, apache is able to automatically createwp-config.php
file.
But In my VPS, I have to manually create wp-config.php
file.
I know that doing chmod 777
is dangerous and chown apache:apache
makes the previous owner can't write to these files.
How can I do this? Do I have to set apache's User
and Group
dynamically?