Raspberry Pi_Eng_13.1.3 Framework for Owner User and Owner Group of File

13.1.3 Framework for Owner User and Owner Group of File

In Linux, users are grouped and managed according to certain criteria to grant or deny privileges to specific user account or user group of. When classifying the types of users who can be granted authority to files, there are three types as follows:

Raspberry Pi_Eng_13.1.2 Confirming Permission Information on Window Screen

13.1.2 Confirming Permission Information on Window Screen

To confirm the details of a specific file on window screen, click right mouse buttpn on the desired file or directory, and then a pop-up screen will appear as shown in the figure below. Click the [Properties] menu there.

Raspberry Pi_Eng_13.1.1 Confirming Permission Information on File

13.1 Understanding Scheme of File Permissions

13.1.1 Confirming Permission Information on File

If you confirm file information on Linux system, you can determine permissions for that file.

Below is the contents of a directory called “testdata” that you have seen with the [File Manager] program on the window screen. You can see that the directory contains a file and another directory.

Raspberry Pi_Eng_13.0 Chapter 13 Control of File Permission

Chapter 13 Control of File Permission

Chapter’s Main Topics

This chapter describes the basic concepts of how a permissions scheme for a file works on a Linux system, and also describes how to change ownership and execution permissions for a file.

It includes descriptions on the following topics:
■ Scheme of file permission

■ Changing the ownership of a file

■ Change execution permission on a file

Raspberry Pi_Eng_12.7.6 “delgroup” Command – Delete User Group

12.7.6 “delgroup” Command – Delete User Group

You will need to delete user groups that are not needed on your system. When deleting a user group, be careful about the user accounts belonging to that group.

When deleting a user group, you can use “delgroup” and “groupdel” commands. The “delgroup” command makes it easy to create user groups. On the other hand, the “groupdel” command can handle relatively detailed processing with very low-level commands, but it is not used for general purposes because it is complex to use.

Raspberry Pi_Eng_12.7.5 “addgroup” Command – Create User Group

12.7.5 “addgroup” Command – Create User Group

You can use “addgroup” and “groupadd” commands to create user groups. The “addgroup” command makes it easy to create user groups. On the other hand, the “groupadd” command can handle relatively detailed processing with very low-level commands, but it is complex to use and is not used for general purposes.

Raspberry Pi_Eng_12.7.4 Managing Relationship between User and User Group

12.7.4 Managing Relationship between User and User Group

Raspberry Pi uses several ways to manage the relationship between user groups and users.

If the user account is not assigned to a separate group, but is assigned only to its own self group, the primary group, the relationship is defined using “/etc/passwd” file.

Raspberry Pi_Eng_12.7.2 Relationship between User and User Group

12.7.2 Relationship between User and User Group

In the Raspberry Pi system, certain user account is always assigned to a specific group. Also, certain user account can belong to more than one group at the same time.

If you do not specify a separate group for a specific user account, the user always belongs to the primary group, which is its own group. This primary group has the same name as its own user account, contains its own user account only, and is created automatically even if you do not create it separately.