Hi!
It's important to understand how PHP-FPM users works and how to deal with them.
PHP requires a GNU/Linux user to control the user's permissions and actions. This is crucial because using a general user profile for PHP will result in losing control over the user's management, such as specifying a specific .pgpass file. Therefore, it's essential to create a dedicated environment for the PHP user.
As Dédalo will execute some PostgreSQL management tasks in the CLI, it requires access to the .pgpass file as the owner. Therefore, the GNU/Linux user must be the PHP-FPM user and the .pgpass user owner. It is essential to ensure that the environment is consistent.
Ok, step by step:
1 create a GNU/Linux user for Dédalo. It will create a $HOME for this user (and this directory could be your project domain as dedalo.dev)
2 assign this user to PHP-FPM (the group could be the generic www-data, but the user must be the GNU/Linux user created for Dédalo)
3 The $HOME of this user will be the scope for PHP-FPM, so, you can include the .pgpass in this directory.
4 DON'T point the Apache DocumentRoot directive to the$HOME directory, this point is super important, because if you point it you are allowing to show the environment!!, so, to create a httpdocs inside the$HOME directory.
6 Point the Apache vhosts to the $HOME/httpdocs directory. Any files outside of httpdocs will be hidden from the outside world, so you can store logs and other non-public files in the $HOME directory.
7 Include the /dedalo directory that was downloaded into the httpdocs and run the installer.
This is a typical vhosts configuration.
/home/gnu_linux_dedalo_user/ httpdocs/dedalo
e.g:
/home/dedalo.dev/.pgpass
/home/dedalo.dev/log
/home/dedalo.dev/httpdocs/dedalo
/home/dedalo.dev/httpdocs/dedalo/core
/home/dedalo.dev/httpdocs/dedalo/libs
/home/dedalo.dev/httpdocs/web
/home/dedalo.dev/httpdocs/web/index.html
...
If you require additional virtual hosts, you can create another GNU/Linux user, configure it as a PHP-FPM user, and assign it its own .pgpass file (and database). Both users can coexist on the same machine without any conflicts.
Can you do it in other way? yes, of course, and maybe could be better in some situations, e.g. development environment that is not important to maintain hidden the .pgpass or sessions, this is only a recommendation, but, is important that you control how deal with the users, vhosts, PHP environment, PostgreSQL environment, etc...
Little more explanation about this here.
I hope is clear and helps.
Note: Perhaps should we enhance the installation documentation?. I understand that you have the freedom to install the software as you please. You can set the www-data user to the root directory if you wish, or modify the paths in config.php. However, perhaps we should be more explicit in the install documentation??
Best