Add user to Apache group www-data in Ubuntu

No Comments Share:

While working in Ubuntu Linux, if you run into a group permissions issue involving Apache2 then you may need to adjust user group settings. The default Apache group in Ubuntu is www-data. To solve the problem, the user needs to be a member of the www-data group. The example below will use the username “bob” for demonstration purposes.

Add an existing user to the www-data group

$ sudo usermod -a -G www-data bob

To verify, use the groups command:

$ groups bob
bob: adm bob cdrom sudo dip www-data plugdev lpadmin sambashare

Create a new user and add them to the www-data group

$ sudo useradd -g www-data bob

To verify, use the groups command:

$ groups bob
bob: www-data
Previous Article

How to Start, Stop, and Restart OpenSSH on Ubuntu 14.04

 

You may also like