The file/folder actually has hidden properties? Yes, hidden properties are important for File/folder security. For example, we need to use "qualifier" to uncover the hidden properties of the rig, and Chattr/lsattr is the "qualifier" in Linux.
CHATTR basic format is: Chattr +-=[ACDEIJSTUADST]. + indicates a hidden attribute is added;-Indicates that a hidden property is removed; = indicates that the hidden property is set directly. Man chattr:
The letters ' ACDEIJSTUADST ' Select the new attributes for the files: append Only (a), Compressed (c), no dump (d) , extent format (e), immutable (i), Data journalling (j), secure deletion (s), no tail-merging (t), undeletable (u), no atime updates (A), Synchronous directory Updates (D), synchronous Updates (S), and top of directory hierarchy (T) .
Looking at these hidden properties, a and I are more domineering. After a is set, then for a file, can only add data, delete and modify data are prohibited (is not more applicable to the log file?). )。 Set I, the file will not be added/modified/deleted data.
Here's how to use the "qualifier" below Linux, in the following steps:
1. Create File: Attrtest.txt
2. View hidden Properties
3. Set hidden properties: +i
4. Attempt to delete the file (attempt to delete failed)
The above steps, if you set the folder again, what will be the result?
1. Create folder: Attrtestfolder
2. View hidden Properties
3. Set hidden properties: +i
4. Try to add files to the folder or delete the folder (both failed)
More about chattr/lsattr, or man!