centos file permissions and directory permissions

/ Etc / passwd: Record information about accounts and the general status of users on all systems, as well as the root

/ Etc / shadow: Record personal password

/ Etc / group: all records linux group name

 

 

Front

d: is the directory -: file |: Peripheral device for files stored inside (in blocks can be random access devices): Link file b

c: inside the device file serial port device (such as a keyboard, a mouse, a one-time reading apparatus)

 chgrp: user group to modify the file the user group chgrp -R file name / directory # -R parameters are recursively, i.e. a user group in this directory file is changed (the name of the group need to be present)

chown: modify the file owner #chown -R account name: name of the file or directory user group

chmod: permission to modify files, SUID, SGID, SBIT   

r: read, read the contents of the file, when the directory has permission r, it indicates the file name can be queried data in the directory

w: can edit, add, modify, delete but do not have permission to have the file itself, if w is a directory with permissions can create new files and directories, delete files and directories already exist, the existing file or directory renaming, usually w directory permissions is very important on the server, not just to

x: executable, x directory permissions that the user can enter the directory becomes the working directory Figure, the so-called working directory is the directory you are currently located, the equivalent of the key drawer, the drawer is Home

For rwx file, mainly for the contents of the file

filename #chmod 777 r = 4, w = 2, x = 1  

Further methods to change permissions #, u representatives user, g group on behalf of a user group, other representatives o other, A represent all people all #chmod u = rwz go = rz filename remove all human rights, # chomd ax file name (- representatives cancellation means, + represents has meaning)

Guess you like

Origin www.cnblogs.com/pooopun/p/12590036.html