- Advanced Infrastructure Penetration Testing
- Chiheb Chebbi
- 135字
- 2021-06-24 19:12:59
The chmod command
To change the permissions of a file, you need to use the chmod command, chmod <letters> <file or directory>. You can also use an octal format instead of letters, chmod <octal format> <file or directory>. To convert the permission from the letters format to the octal format, you need to convert every permission into a value:

Now, let's take an example and see how to use the chmod command with the octal format in an easy way. Let's suppose that we need to give the user the permission to read and write, the group only to read, and others only to execute. Then, the octal format will be 641, because:
- User: Read + Write = 6
- Group: Read = 4
- Other: Execute = 1
The final command will be: chmod 641 <file>
推薦閱讀
- Linux設備驅動開發詳解(第2版)
- 構建高可用Linux服務器(第4版)
- 嵌入式操作系統(Linux篇)(微課版)
- Linux自動化運維:Shell與Ansible(微課版)
- 突破平面3ds Max動畫設計與制作
- Mastering Reactive JavaScript
- 一學就會:Windows Vista應用完全自學手冊
- 云原生落地:產品、架構與商業模式
- Social Data Visualization with HTML5 and JavaScript
- iOS 8開發指南
- iOS 10 開發指南
- 統信UOS應用開發進階教程
- OpenHarmony開發與實踐:基于紅莓RK2206開發板
- OpenStack Essentials(Second Edition)
- 鴻蒙入門:HarmonyOS應用開發