[Linux Learning]—Common Linux Instructions (1)

[Linux Learning]—Common Linux Instructions (1)

1. Group management and permission management

Every user in Linux must belong to a group and cannot be independent from outside the group.

1️⃣Owner

Generally, it is the creator of the file. Whoever created the file automatically becomes the owner of the file.

View the owner of a file:ls -ahl
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

2️⃣The group you belong to

When a user creates a file, the group to which the file belongs is the group to which the user belongs.

Insert image description here
Insert image description here

3️⃣Other groups

Except for the owner of the file and the users in its group, all other users of the system are other groups of the file.

Insert image description here

usermod -g wuudang zwj

2. Basic introduction to permissions

Insert image description here
Insert image description here

Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

chmod 755 /home/abc.txt

Insert image description here
Insert image description here
Insert image description here

3. Practice

Insert image description here

[root@study user]# groupadd police
[root@study user]# groupadd bandit
[root@study user]# useradd -g police jack
[root@study user]# useradd -g bandit jerry
[root@study user]# useradd -g bandit xh
[root@study user]# useradd -g bandit xq

Insert image description here

4. crond task scheduling

Insert image description here

Insert image description here

Insert image description here

Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/m0_46374969/article/details/134022169