Linux self-study journey-basic commands (the role of basic permissions)

Comprehensive function of basic permissions of Linux self-study journey


Preface

1. In the previous section, we described the first command chmod for the operation of permissions. Its main function is to modify a permission mode of a file or directory. If you haven’t read it, please click the link below to watch: chmod permissions command

2. In this section, we will revisit the role of the basic permission bits, and summarize the permissions of directories and files together, so that the knowledge points can be better integrated.


Tip: The following is the content of this article

1. File permission bits

Insert picture description here

(实例)
[root@student ceshi]# ls -ld passwd 
--w--w--w-. 1 root root 1911 1月  22 08:27 passwd
[root@student ceshi]# 

As above passwd this file
{

File type: ordinary file

Owner: w (writable permission)

Group: w (writable permission)

Others: w (writable permission)

.: SElinux is enabled on this file system
}

Second, the directory permission bit

Insert picture description here

(实例)
[root@student ceshi]# ls -ld jh/
drwxr-xr-x. 2 root root 6 1月  23 16:46 jh/
[root@student ceshi]# 

As above jh this file {

File type: catalog file

Owner: rwx (you can enter the directory and view the files in the directory at the same time you can modify the contents of the files in the directory)

Belonging to the group: rx (you can enter the directory and view the files in the directory, you cannot modify it)

Others: rx (you can enter the directory and view the files in the directory, you cannot modify it)

.: SElinux is turned on
}


to sum up

So that's the end of this section, mainly to integrate the basic permissions of files and directory files.

This is Jiehua, see you next time!

Guess you like

Origin blog.csdn.net/qq313088385/article/details/113126604
Recommended