Add a User To Group www-data ( Apache Group )

The procedure is as follows:

  • Open the terminal application.
  • Login to Ubuntu server using ssh.
  • Add a new user named foo to www-data group by running useradd -g www-data foo command.
  • Add an existing user bar to Apache’s www-data group on Ubuntu using usermod -a -G www-data bar command.
  • Verify new modification on Linux by using the id command.

Let us see all commands in details.

How to see a list of www-data members

To see list of all members of a group named www-data, run the following grep command on /etc/group file:

grep ^www-data /etc/group

Sample outputs:


How do I add an existing user named vivek to group Apache group www-data? Continue reading “Add a User To Group www-data ( Apache Group )” »