First, the file permissions
1. File Properties
2. file permissions defined for three main target
owner: owner , u
group: is a group , g
other: Other , o
3. Each file for each class defines three visitors have permission
r: Readable,读
w: Writable,写
the X-: eXcutable , execution
(1) for file
r: file can be used to view the contents of its kind tool to get
w: can modify its contents
x: can put this document to draw the kernel starts a process
(2) for directory
r: You can use ls see a list of files in this directory
w: You can create files in this directory can also delete files in this directory
x: use ls -l view file metadata (this directory must be compatible with R & lt ), may cd enter the directory
X: only to directory x authority, do not give files x permissions
4. file permissions list
5. Modify File Permissions command
(1) chmod [OPTION]... MODE[,MODE]... FILE...
MODE:
Modify all the permissions for a class of users:
u = g = o = and = a = u =, g =
Example:
Modify a class of users by a certain position or privilege
u+ u- g+ g- o+ o- a+ a- + -
Example:
in
(2) chmod [OPTION]... --reference=RFILE FILE...
Reference RFILE file permissions, the FILE changes for the same RFILE
Example:
(3) chmod [OPTION]... OCTAL-MODE FILE...
Parameters and examples:
-R: recursively modify the permissions
(4) a digital reference file permissions list representation modify permissions
Example:
Second, file the owner and group
1. The owner modify the file: chown
(1) chown [OPTION]... [OWNER][:[GROUP]] FILE...
usage:
OWNER
OWNER:GROUP
:GROUP
NOTE: The commands available in the colon . Alternatively
-R: Recursive
(2) chown [OPTION]... --reference=RFILE FILE...
2 is a modified set of files: chgrp
Previously by chown demonstrates a variation which is set at the same time change the owner's command, the following presentation is a group of individual change command
(1) chgrp [OPTION]... GROUP FILE...
(2) chgrp [OPTION]... --reference=RFILE FILE...
(. 3) -R & lt recursively