There are a couple of concepts to understand before you know the file's read-write executable file:
1. Process ID
Each process has multiple ID associations
Actual User ID actual user group ID (identifies the user who executed the program)
Valid user ID Valid User Group ID additional group ID (identifies user access rights)
Save Settings User ID keep set group ID (the ID will be set to a valid user ID when the program executes)
2. File access rights
File Owner permissions, filegroup permissions, other people permissions, respectively (read and write execution) these three permissions
When a process accesses a file, the system kernel makes the following decision:
1. If the process valid user ID is 0 (that is, root), access is allowed
2. If the process valid user ID and file owner is the same, as long as the file corresponding to the permission bit set, you can access
3. If the process valid group ID is the same as the file owner, as long as the file corresponds to the permission bit set, you can access
4. If the file is set to the other person's permission bit, you can access
UNIX File Permissions judgment