sajad torkamani

What is a group?

A group in Unix systems allows you to provide shared access control among users for things like file permissions, process privileges and system operations.

Example use case of a group: controlling file access

You can create a group and then provide permissions to that group so that only users of that group can do certain things.

For example:

  • You have a /var/www directory that you only want your senior developers to be able to edit, not other developers.
  • You create a group webadmin and add your senior devs John and Bob to that group.
  • You chown the /var/www directory to :webadmin and chmod g+rw to give read & write permissions to the webadmin group.
  • Now, only users in the webadmin group (John and Bob) can edit the /var/www directory.