Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand Linux chmod commands and permissions

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to understand Linux chmod commands and permissions". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to understand Linux chmod commands and permissions".

For a permission assignment command: sudo chmod-R 764 × ×; we must understand its meaning:

(1) meaning of each field: sudo chmod-R (change folder and its subfolders)

7 (owner rights) 6 (group user rights) 4 (other user rights) xxx (target file)

(2) first of all, understand the following permission correspondence (execute permission letter means permission meaning execute permission value representation):

R read right 4

W write right 2

X execution right 1

Rwx (read, write, execute)

Rw- (read, write)

.

(3) the origin of 7, 6 and 4

To rwx:4+2+1=7;, to rw-:4+2=6;, to r-x:4+1=5.

(4) Common permission commands:

The code is as follows:

Sudo chmod 777-R xxx (change folder and subfolder permissions to 777)

Sudo chmod 600 × × (only the owner has read and write permissions)

Sudo chmod 644 × × (owners have read and write permissions, group users only have read permissions)

Sudo chmod 700 × × (only the owner has permission to read, write and execute)

Sudo chmod 666 × × (everyone has read and write access)

Sudo chmod 777 × × (everyone has access to read, write and execute

Thank you for your reading, the above is the content of "how to understand Linux chmod commands and permissions". After the study of this article, I believe you have a deeper understanding of how to understand Linux chmod commands and permissions, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report