Linux rights management (two)

Settings file access method of
access 1.chmod settings file
command format: chmod [parameters] filename permissions
recursively modify the permissions of the file directory R->
Format command chmod permissions value
+ symbol to increase the authority of competence represented permissions
- cancel permission rights to the purview of the code represented by
= give permission to the permission code represented purview
of user symbols:
U: owner
g: the same group with the owner
o: other users
a: the user
2.chown modified file owner
chown [parameter] user name file name
belongs to the group 3.chgrp modify a file or directory
chgrp [parameter] user group filename
4.umask view or modify the file mask
New folder = 0666 default permissions for
the new directory permissions default 0777 =
the umask permission values
after subtracting the existing access permissions mask, can produce preset establish file permissions, the default super user mask value 0022, the average user default 0002

instruction file
Function: identifying a file type
file [option] file or directory
-c instruction execution process is shown in detail, in the case to facilitate debugging or analyzing programs executed
-z attempt to interpret the contents of the compressed file
(1) modify the / etc / sudoers file allocation file
(2) use the sudo command to call an authorized username command $ sudo -u

Directory permissions
executable permissions : If the directory is not executable permissions, you can not cd into the directory
readable permissions : If the directory does not have read permission, you can not use commands such as ls to view the contents of files in the directory
writable : If the directory is not write permissions, you can not create files in the directory can not delete files in the directory

Published 10 original articles · won praise 16 · views 326

Guess you like

Origin blog.csdn.net/qq_45386840/article/details/104578448