Skip to main content
2 of 2
Markup fixed
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

It sounds like you want to add an existing user to another group. Use usermod to do that -

usermod -a -G ubuntu www-data 

The change will be in the /etc/group file. You can check it with id www-data and groups Ubuntu commands. Also, use the upper-case G, or you will replace the existing primary group.

user103944
  • 410
  • 2
  • 4