4.1 setgid and web servers

In most distributions, the web server (usually Apache) runs as its own user, www-data for Debian-based distributions. It is important that the web server does not run as root for security reasons.

If the web server permits users to have their own web content published, this www-data user poses some interesting issues. In order for the web server to be able to access a user’s web content, there are a few options.