File permissions
2. File permissions
File permissions are defined primarily for three types of objects
Owner: Master, u
Group: Genus, G
Other: Others, O
Each file has three permissions defined for each type of visitor
R:readable
W:writable
X:excutable
File:
R: Use the File View class tool to get its contents
W: can modify its contents
X: This file can be brought to the kernel to start as a process
Directory:
R: You can use LS to view the list of files in this directory
W: You can create files in this directory or delete files in this directory
X: You can use Ls-l to view a list of files in this directory, and you can enter this directory by CD
Permission entries |
File type |
Read |
Write |
Perform |
Read |
Write |
Perform |
Read |
Write |
Perform |
Character representation |
( d|l|c|s|p ) |
(r) |
(W) |
(x) |
(r) |
(W) |
(x) |
(r) |
(W) |
(x) |
Digital representation |
|
4 |
2 |
1 |
4 |
2 |
1 |
4 |
2 |
1 |
Permission Assignment |
|
File owner |
File belongs to group user |
Other users |
Depending on the binary algorithm, set permissions on the file as follows:
3. Command
chmod (change model) + level + Flie
Eg:chmod 777 PMA
Of course each file has its own fixed permissions when it is initially created, not for each set, how is it implemented?
The answer is: when the system creates a file or folder, there will be a ' umask ' reverse mask reverse mask that is different for each user, and you can view the current user's value by entering ' umask '.
The initial setup file permissions are computed as: 777-022=755 is represented as W:7 RWX g:5 rw-o:5 rw-.
Introduction to Linux file Rights Management