Understanding users, groups, and basic permissions
Multi-user environments are defined by being able to handle more than one user simultaneously. But in order to be able to administer the system resources, there are two capabilities that help with the tasks:
- Groups: Can aggregate users and provide permission for them in blocks.
Each user has a primary group.
By default, a group is created for each user and assigned to it as a primary with the same name as the username.
- Permissions: Are assigned to files and determine which users and groups can access each file.
Standard Linux (and UNIX/POSIX) permissions include user, group, and others (
ugo
).
The whole system comes with a set of permissions assigned by default to each file and directory. Be careful when changing them.
There is a principle in UNIX that Linux inherited that is: everything is a file. Even when there may be some corner cases to this principle, it stays true on almost any occasion. It means that a disk...