Chapter 4. User, Group and Permission

What Are User, Group And Permission in Linux?

What Are User, Group And Permission in Linux?
Tag:

Superuser (root user) vs. Normal user

In Linux, there are two types of users – a superuser and a normal user. The superuser is a special user account used for system administration. The superuser has permissions for all Linux system resources while normal users have limited access to Linux system resources depending on the permission setting for each file and directory.

File and Directory owner

Each file or directory has an owner. Generally, the user who created the file or directory is the owner of the file or directory.

Group

In Linux, you can manage users by group. File and directory permissions can be more efficient when users are registered in a certain group. There are two types of groups – primary group and secondary group. The primary group is used for the initial owner group when a new file or directory is created.

Owner Status

There are three owner statuses of a file or directory.

  1. Owner (of the file or directory): generally, the user who created the file or directory is the owner of the file or directory. You can change the owner by running the chown command.
  2. Owner group: generally, the owner user's primary group becomes the owner group of the file or directory. You can change the owner group by running the chgrp command.
  3. Others: users who are not in the owner group of the file or directory

Permission (Access Mode)

Depending on the owner status of a file or directory, the accessibility of the file or directory can be different. This is called permission or access mode. When you run the ls command with the -l option, you can see the access mode of each file by user status.

What-Are-User-Group-And-Permission-in-Linux

Superuser (root user) vs. Normal user

In Linux, there are two types of users – a superuser and a normal user. The superuser is a special user account used for system administration. The superuser has permissions for all Linux system resources while normal users have limited access to Linux system resources depending on the permission setting for each file and directory.

File and Directory owner

Each file or directory has an owner. Generally, the user who created the file or directory is the owner of the file or directory.

Group

In Linux, you can manage users by group. File and directory permissions can be more efficient when users are registered in a certain group. There are two types of groups – primary group and secondary group. The primary group is used for the initial owner group when a new file or directory is created.

Owner Status

There are three owner statuses of a file or directory.

  1. Owner (of the file or directory): generally, the user who created the file or directory is the owner of the file or directory. You can change the owner by running the chown command.
  2. Owner group: generally, the owner user's primary group becomes the owner group of the file or directory. You can change the owner group by running the chgrp command.
  3. Others: users who are not in the owner group of the file or directory

Permission (Access Mode)

Depending on the owner status of a file or directory, the accessibility of the file or directory can be different. This is called permission or access mode. When you run the ls command with the -l option, you can see the access mode of each file by user status.

What-Are-User-Group-And-Permission-in-Linux

Tag: