To add a user to the www-data
group (Apache group) in Ubuntu, you can use the following steps:
- Open a terminal window.
- Use the
adduser
command to add the user to thewww-data
group:
sudo adduser [username] www-data
Replace [username]
with the actual username of the user you want to add to the group.
- Log out and log back in for the changes to take effect.
- Verify that the user has been added to the
www-data
group by using theid
command:
id [username]
This will display information about the user, including the groups they belong to. The www-data
group should be listed among the groups.