Hi all, i'm hardening a web server with apache. PhpsecInfo suggest me to do this: "Change the user and group that PHP executes as. If you're using the Apache module, you'll need to change what user Apache runs as with the User and Group directives" How can I do it? On my server i got just root user and root group. I can create new users and new group but how can I tell to system to use that user to execute PHP? Thanks a lot.
If you're using mod_php, you must change the User and Group directives in the apache configuration. To create users and groups, take a look at Code: man groupadd man useradd
Thanks Falko, the problem is that i don't know how to change the User and Group directives in the apache configuration. I know how to add users and group but where I can change? apache2.conf? Thanks.
Depends on your distribution. For Debian/Ubuntu, it's /etc/apache2/apache2.conf, and for Fedora/CentOS, it's /etc/httpd/conf/httpd.conf.