each Linux files have four access rights: readable (r) 4, writable (W) 2, executable (x) 1, and no Permissions (-)
- rw- r-- r-- 1 root root 7 20:21 monitor_log.sh
first column: File type -Indicates that file D represents a directory
2-4-bit: Permissions for file owners
5-7-bit: Permissions for the group to which the file belongs
8-10-bit: Other user rights
Second column: Connection occupancy node
Column three: The main file belongs to
Fourth column: Group to which the file belongs
Fifth column: Size of File
VI, seven or eight columns: Last Modified date (month date time)
Nineth Column: File name
1. Change read and write execution permissions for a file Chmod:chmod 777 Test.txt
-R parameter for cascading
2. Change the file (directory) belongs to group: CHGRP [group name] [filename] can only change the directory itself and directories or files under the directory does not change the-r option can be implemented
3. Change the file's owning primary Chown:chown [-r] Account name file name
Chown [-r] Account name: Group name File name (-R acting on directory purpose is cascade change)
4.umask (set permission complement)
5.chattr (modify file special attributes)
+-= Increase reduction setting
' A ' atime cannot be modified after adding this attribute to the file or directory
' S ' writes data synchronously to disk
' A ' can only append cannot be deleted (non-root user cannot set)
' C ' automatically compresses the file (it will be extracted automatically when read)
' I ' makes the file cannot be deleted, renamed, set Link, write, new data
This article is from the "Exclusive View" blog, please be sure to keep this source http://molujiang.blog.51cto.com/9742572/1878437
Linux file permissions