
上QQ阅读APP看书,第一时间看更新
Permissions
Linux is a multiuser operating system. To protect user accounts and groups, different rights are given to each user and group. There are three main permissions in a Linux system: read, write, and execution. These can be described as follows:
- Read is the ability to view a file and list the content if the target is a directory. It is represented by the letter (r).
- Write allows a user to modify certain files and contents of a directory. It is represented by the letter (w).
- Execute allows a user to run a script or a program and change directories. It is represented by the letter (x).
There are three types of permissions as follows:
- Set User Identification (SUID): When SUID is set, the file will be executed with the same permission as the user.
- Set Group ID (SGID): It is the same as SUID, but the file will be executed with the same permission as the group.
- Sticky Bit: This permission is used when you can create, modify, or execute, but you can't delete files of another user. Generally used on shared libraries.